@camstack/types 1.2.327 → 1.2.329

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.
Files changed (72) hide show
  1. package/dist/addon/base-addon.d.ts +58 -0
  2. package/dist/addon/secret-aware-context.d.ts +27 -0
  3. package/dist/addon/secret-paths.d.ts +48 -0
  4. package/dist/addon/secret-settings-view.d.ts +80 -0
  5. package/dist/addon.d.ts +1 -0
  6. package/dist/addon.js +52 -4
  7. package/dist/addon.mjs +27 -5
  8. package/dist/capabilities/addons.cap.d.ts +4 -4
  9. package/dist/capabilities/alarm-panel.cap.d.ts +8 -8
  10. package/dist/capabilities/alerts.cap.d.ts +5 -5
  11. package/dist/capabilities/control.cap.d.ts +11 -11
  12. package/dist/capabilities/day-night.cap.d.ts +16 -16
  13. package/dist/capabilities/device-manager.cap.d.ts +2 -0
  14. package/dist/capabilities/enum-sensor.cap.d.ts +4 -4
  15. package/dist/capabilities/index.d.ts +6 -2
  16. package/dist/capabilities/integrations.cap.d.ts +6 -3
  17. package/dist/capabilities/keychain-admin.cap.d.ts +312 -0
  18. package/dist/capabilities/keychain.cap.d.ts +180 -0
  19. package/dist/capabilities/lawn-mower-control.cap.d.ts +4 -4
  20. package/dist/capabilities/log-channels.cap.d.ts +1 -1
  21. package/dist/capabilities/log-destination.cap.d.ts +5 -5
  22. package/dist/capabilities/notification-rules.cap.d.ts +118 -118
  23. package/dist/capabilities/osd-manager.cap.d.ts +11 -11
  24. package/dist/capabilities/osd.cap.d.ts +5 -5
  25. package/dist/capabilities/pipeline-analytics.cap.d.ts +1291 -118
  26. package/dist/capabilities/pipeline-orchestrator.cap.d.ts +384 -0
  27. package/dist/capabilities/pipeline-runner.cap.d.ts +145 -2
  28. package/dist/capabilities/storage.cap.d.ts +1 -1
  29. package/dist/capabilities/system.cap.d.ts +16 -16
  30. package/dist/capabilities/webrtc-session.cap.d.ts +3 -3
  31. package/dist/client.js +37 -1
  32. package/dist/client.mjs +37 -1
  33. package/dist/device/device-context.d.ts +11 -1
  34. package/dist/device/index.d.ts +1 -1
  35. package/dist/enums/event-category.d.ts +7 -0
  36. package/dist/enums.js +1 -1
  37. package/dist/enums.mjs +1 -1
  38. package/dist/{event-category-CtBAl88K.js → event-category-CHduMGvg.js} +7 -0
  39. package/dist/{event-category-B_0XEcLF.mjs → event-category-DaIZi00R.mjs} +7 -0
  40. package/dist/generated/addon-api.d.ts +289 -0
  41. package/dist/generated/cap-input-defaults.d.ts +1 -1
  42. package/dist/generated/capability-router-map.d.ts +8 -2
  43. package/dist/generated/method-access-map.d.ts +1 -1
  44. package/dist/generated/method-device-selectors.d.ts +1 -1
  45. package/dist/generated/system-proxy.d.ts +4 -2
  46. package/dist/health/wiring-health.d.ts +8 -8
  47. package/dist/index.d.ts +6 -2
  48. package/dist/index.js +1881 -101
  49. package/dist/index.mjs +1766 -98
  50. package/dist/interfaces/addon.d.ts +25 -0
  51. package/dist/interfaces/config-ui-secrets.d.ts +12 -0
  52. package/dist/interfaces/config-ui.d.ts +29 -1
  53. package/dist/interfaces/event-bus.d.ts +11 -0
  54. package/dist/interfaces/pipeline-runner-capability.d.ts +18 -0
  55. package/dist/keychain/index.d.ts +5 -0
  56. package/dist/keychain/known-secrets.d.ts +31 -0
  57. package/dist/keychain/resolve-secret-views.d.ts +2 -0
  58. package/dist/keychain/secret-marker.d.ts +52 -0
  59. package/dist/keychain/secret-ref.d.ts +62 -0
  60. package/dist/keychain/secrets-access.d.ts +77 -0
  61. package/dist/logging/log-channel.d.ts +2 -2
  62. package/dist/pipeline/auto-tune/plan-schemas.d.ts +123 -0
  63. package/dist/pipeline/auto-tune/recommend.d.ts +26 -1
  64. package/dist/pipeline/load-balancing/schemas.d.ts +8 -7
  65. package/dist/pipeline/node-benchmark/benchmark-mode.d.ts +57 -0
  66. package/dist/pipeline/node-benchmark/index.d.ts +9 -0
  67. package/dist/pipeline/node-benchmark/results.d.ts +52 -0
  68. package/dist/pipeline/node-benchmark/schemas.d.ts +848 -0
  69. package/dist/pipeline/node-benchmark/step-tree.d.ts +23 -0
  70. package/dist/{sleep-az1qiFzK.js → sleep-ClNXPpWR.js} +1580 -121
  71. package/dist/{sleep-B0JG7-_F.mjs → sleep-DujUvOcb.mjs} +1340 -121
  72. package/package.json +1 -1
@@ -930,11 +930,24 @@ export declare const RetrainAnnotationKindSchema: z.ZodEnum<{
930
930
  subject: "subject";
931
931
  model_error: "model_error";
932
932
  }>;
933
- /** Did a human draw this box, or did the assist propose it? */
933
+ /**
934
+ * Where a box came from. A machine-sourced box is a DRAFT on the page until
935
+ * the operator confirms it; once saved it keeps its source as provenance.
936
+ *
937
+ * - `operator` — drawn by hand.
938
+ * - `assist` — proposed by a detector run on the copy (the camera's own
939
+ * model, or a larger teacher model).
940
+ * - `pipeline` — the box the live pipeline actually drew on that frame, read
941
+ * back from the track store (never a re-run).
942
+ * - `llm` — proposed by a vision-capable LLM profile.
943
+ */
934
944
  export declare const RetrainAnnotationSourceSchema: z.ZodEnum<{
935
945
  operator: "operator";
946
+ pipeline: "pipeline";
936
947
  assist: "assist";
948
+ llm: "llm";
937
949
  }>;
950
+ export type RetrainAnnotationSource = z.infer<typeof RetrainAnnotationSourceSchema>;
938
951
  /**
939
952
  * One annotated subject.
940
953
  *
@@ -945,7 +958,7 @@ export declare const RetrainAnnotationSourceSchema: z.ZodEnum<{
945
958
  */
946
959
  export declare const RetrainAnnotationSchema: z.ZodObject<{
947
960
  id: z.ZodString;
948
- trackId: z.ZodString;
961
+ trackId: z.ZodOptional<z.ZodString>;
949
962
  deviceId: z.ZodNumber;
950
963
  mediaKey: z.ZodString;
951
964
  bbox: z.ZodObject<{
@@ -970,7 +983,9 @@ export declare const RetrainAnnotationSchema: z.ZodObject<{
970
983
  }>;
971
984
  source: z.ZodEnum<{
972
985
  operator: "operator";
986
+ pipeline: "pipeline";
973
987
  assist: "assist";
988
+ llm: "llm";
974
989
  }>;
975
990
  assistModelId: z.ZodOptional<z.ZodString>;
976
991
  assistScore: z.ZodOptional<z.ZodNumber>;
@@ -993,7 +1008,9 @@ export declare const RetrainAnnotationDraftSchema: z.ZodObject<{
993
1008
  label: z.ZodOptional<z.ZodString>;
994
1009
  source: z.ZodEnum<{
995
1010
  operator: "operator";
1011
+ pipeline: "pipeline";
996
1012
  assist: "assist";
1013
+ llm: "llm";
997
1014
  }>;
998
1015
  subLabel: z.ZodOptional<z.ZodString>;
999
1016
  macroClass: z.ZodEnum<{
@@ -1046,12 +1063,61 @@ export declare const RetrainFrameCandidateSchema: z.ZodObject<{
1046
1063
  copied: z.ZodBoolean;
1047
1064
  }, z.core.$strip>;
1048
1065
  export type RetrainFrameCandidate = z.infer<typeof RetrainFrameCandidateSchema>;
1066
+ /**
1067
+ * One box the live pipeline drew on a copied frame — what a correction starts
1068
+ * from. Derived when the frame is listed, from the track store: the subject
1069
+ * box recorded on the source media row when there is one, else the track
1070
+ * position nearest the frame's capture time. Never stored as an annotation
1071
+ * until the operator confirms it.
1072
+ */
1073
+ export declare const RetrainPipelineBoxSchema: z.ZodObject<{
1074
+ bbox: z.ZodObject<{
1075
+ x: z.ZodNumber;
1076
+ y: z.ZodNumber;
1077
+ w: z.ZodNumber;
1078
+ h: z.ZodNumber;
1079
+ }, z.core.$strip>;
1080
+ macroClass: z.ZodEnum<{
1081
+ person: "person";
1082
+ vehicle: "vehicle";
1083
+ animal: "animal";
1084
+ package: "package";
1085
+ face: "face";
1086
+ plate: "plate";
1087
+ }>;
1088
+ label: z.ZodOptional<z.ZodString>;
1089
+ subLabel: z.ZodOptional<z.ZodString>;
1090
+ score: z.ZodOptional<z.ZodNumber>;
1091
+ modelId: z.ZodOptional<z.ZodString>;
1092
+ trackId: z.ZodString;
1093
+ basis: z.ZodEnum<{
1094
+ position: "position";
1095
+ "subject-box": "subject-box";
1096
+ }>;
1097
+ deltaMs: z.ZodNumber;
1098
+ }, z.core.$strip>;
1099
+ export type RetrainPipelineBox = z.infer<typeof RetrainPipelineBoxSchema>;
1100
+ /**
1101
+ * Where a retrain frame came from: a TRACK's stored media (copy-on-select),
1102
+ * or the RECORDING at an instant — the frame a model saw nothing in has no
1103
+ * track at all.
1104
+ */
1105
+ export declare const RetrainFrameOriginSchema: z.ZodEnum<{
1106
+ recording: "recording";
1107
+ track: "track";
1108
+ }>;
1109
+ export type RetrainFrameOrigin = z.infer<typeof RetrainFrameOriginSchema>;
1049
1110
  /** A frame the dataset OWNS: bytes copied at selection time. */
1050
1111
  export declare const RetrainFrameSchema: z.ZodObject<{
1051
1112
  frameId: z.ZodString;
1052
1113
  deviceId: z.ZodNumber;
1053
- trackId: z.ZodString;
1054
- sourceMediaId: z.ZodNumber;
1114
+ origin: z.ZodEnum<{
1115
+ recording: "recording";
1116
+ track: "track";
1117
+ }>;
1118
+ trackId: z.ZodOptional<z.ZodString>;
1119
+ sourceMediaId: z.ZodOptional<z.ZodNumber>;
1120
+ epochMs: z.ZodOptional<z.ZodNumber>;
1055
1121
  sourceKind: z.ZodEnum<{
1056
1122
  crop: "crop";
1057
1123
  thumbnail: "thumbnail";
@@ -1076,6 +1142,33 @@ export declare const RetrainFrameSchema: z.ZodObject<{
1076
1142
  copiedAt: z.ZodNumber;
1077
1143
  capturedAt: z.ZodOptional<z.ZodNumber>;
1078
1144
  complete: z.ZodBoolean;
1145
+ pipelineBoxes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
1146
+ bbox: z.ZodObject<{
1147
+ x: z.ZodNumber;
1148
+ y: z.ZodNumber;
1149
+ w: z.ZodNumber;
1150
+ h: z.ZodNumber;
1151
+ }, z.core.$strip>;
1152
+ macroClass: z.ZodEnum<{
1153
+ person: "person";
1154
+ vehicle: "vehicle";
1155
+ animal: "animal";
1156
+ package: "package";
1157
+ face: "face";
1158
+ plate: "plate";
1159
+ }>;
1160
+ label: z.ZodOptional<z.ZodString>;
1161
+ subLabel: z.ZodOptional<z.ZodString>;
1162
+ score: z.ZodOptional<z.ZodNumber>;
1163
+ modelId: z.ZodOptional<z.ZodString>;
1164
+ trackId: z.ZodString;
1165
+ basis: z.ZodEnum<{
1166
+ position: "position";
1167
+ "subject-box": "subject-box";
1168
+ }>;
1169
+ deltaMs: z.ZodNumber;
1170
+ }, z.core.$strip>>>>;
1171
+ collectionIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
1079
1172
  }, z.core.$strip>;
1080
1173
  export type RetrainFrame = z.infer<typeof RetrainFrameSchema>;
1081
1174
  /** Why a copy-on-select could not be honoured — named, never a silent skip. */
@@ -1088,8 +1181,13 @@ export declare const RetrainFrameSelectionSchema: z.ZodObject<{
1088
1181
  copied: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1089
1182
  frameId: z.ZodString;
1090
1183
  deviceId: z.ZodNumber;
1091
- trackId: z.ZodString;
1092
- sourceMediaId: z.ZodNumber;
1184
+ origin: z.ZodEnum<{
1185
+ recording: "recording";
1186
+ track: "track";
1187
+ }>;
1188
+ trackId: z.ZodOptional<z.ZodString>;
1189
+ sourceMediaId: z.ZodOptional<z.ZodNumber>;
1190
+ epochMs: z.ZodOptional<z.ZodNumber>;
1093
1191
  sourceKind: z.ZodEnum<{
1094
1192
  crop: "crop";
1095
1193
  thumbnail: "thumbnail";
@@ -1114,6 +1212,33 @@ export declare const RetrainFrameSelectionSchema: z.ZodObject<{
1114
1212
  copiedAt: z.ZodNumber;
1115
1213
  capturedAt: z.ZodOptional<z.ZodNumber>;
1116
1214
  complete: z.ZodBoolean;
1215
+ pipelineBoxes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
1216
+ bbox: z.ZodObject<{
1217
+ x: z.ZodNumber;
1218
+ y: z.ZodNumber;
1219
+ w: z.ZodNumber;
1220
+ h: z.ZodNumber;
1221
+ }, z.core.$strip>;
1222
+ macroClass: z.ZodEnum<{
1223
+ person: "person";
1224
+ vehicle: "vehicle";
1225
+ animal: "animal";
1226
+ package: "package";
1227
+ face: "face";
1228
+ plate: "plate";
1229
+ }>;
1230
+ label: z.ZodOptional<z.ZodString>;
1231
+ subLabel: z.ZodOptional<z.ZodString>;
1232
+ score: z.ZodOptional<z.ZodNumber>;
1233
+ modelId: z.ZodOptional<z.ZodString>;
1234
+ trackId: z.ZodString;
1235
+ basis: z.ZodEnum<{
1236
+ position: "position";
1237
+ "subject-box": "subject-box";
1238
+ }>;
1239
+ deltaMs: z.ZodNumber;
1240
+ }, z.core.$strip>>>>;
1241
+ collectionIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
1117
1242
  }, z.core.$strip>>>;
1118
1243
  refused: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1119
1244
  sourceMediaId: z.ZodNumber;
@@ -1153,8 +1278,13 @@ export declare const RetrainFrameListSchema: z.ZodObject<{
1153
1278
  copies: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1154
1279
  frameId: z.ZodString;
1155
1280
  deviceId: z.ZodNumber;
1156
- trackId: z.ZodString;
1157
- sourceMediaId: z.ZodNumber;
1281
+ origin: z.ZodEnum<{
1282
+ recording: "recording";
1283
+ track: "track";
1284
+ }>;
1285
+ trackId: z.ZodOptional<z.ZodString>;
1286
+ sourceMediaId: z.ZodOptional<z.ZodNumber>;
1287
+ epochMs: z.ZodOptional<z.ZodNumber>;
1158
1288
  sourceKind: z.ZodEnum<{
1159
1289
  crop: "crop";
1160
1290
  thumbnail: "thumbnail";
@@ -1179,6 +1309,33 @@ export declare const RetrainFrameListSchema: z.ZodObject<{
1179
1309
  copiedAt: z.ZodNumber;
1180
1310
  capturedAt: z.ZodOptional<z.ZodNumber>;
1181
1311
  complete: z.ZodBoolean;
1312
+ pipelineBoxes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
1313
+ bbox: z.ZodObject<{
1314
+ x: z.ZodNumber;
1315
+ y: z.ZodNumber;
1316
+ w: z.ZodNumber;
1317
+ h: z.ZodNumber;
1318
+ }, z.core.$strip>;
1319
+ macroClass: z.ZodEnum<{
1320
+ person: "person";
1321
+ vehicle: "vehicle";
1322
+ animal: "animal";
1323
+ package: "package";
1324
+ face: "face";
1325
+ plate: "plate";
1326
+ }>;
1327
+ label: z.ZodOptional<z.ZodString>;
1328
+ subLabel: z.ZodOptional<z.ZodString>;
1329
+ score: z.ZodOptional<z.ZodNumber>;
1330
+ modelId: z.ZodOptional<z.ZodString>;
1331
+ trackId: z.ZodString;
1332
+ basis: z.ZodEnum<{
1333
+ position: "position";
1334
+ "subject-box": "subject-box";
1335
+ }>;
1336
+ deltaMs: z.ZodNumber;
1337
+ }, z.core.$strip>>>>;
1338
+ collectionIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
1182
1339
  }, z.core.$strip>>>;
1183
1340
  autoPickMediaId: z.ZodOptional<z.ZodNumber>;
1184
1341
  }, z.core.$strip>;
@@ -1193,6 +1350,8 @@ export type RetrainFrameList = z.infer<typeof RetrainFrameListSchema>;
1193
1350
  export declare const RetrainExportFilterSchema: z.ZodObject<{
1194
1351
  deviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
1195
1352
  frameIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1353
+ collectionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1354
+ datasetVersionId: z.ZodOptional<z.ZodString>;
1196
1355
  batchId: z.ZodOptional<z.ZodString>;
1197
1356
  completeOnly: z.ZodOptional<z.ZodBoolean>;
1198
1357
  }, z.core.$strip>;
@@ -1272,7 +1431,9 @@ export declare const RetrainAssistResultSchema: z.ZodDiscriminatedUnion<[z.ZodOb
1272
1431
  label: z.ZodOptional<z.ZodString>;
1273
1432
  source: z.ZodEnum<{
1274
1433
  operator: "operator";
1434
+ pipeline: "pipeline";
1275
1435
  assist: "assist";
1436
+ llm: "llm";
1276
1437
  }>;
1277
1438
  subLabel: z.ZodOptional<z.ZodString>;
1278
1439
  macroClass: z.ZodEnum<{
@@ -1293,110 +1454,503 @@ export declare const RetrainAssistResultSchema: z.ZodDiscriminatedUnion<[z.ZodOb
1293
1454
  detail: z.ZodOptional<z.ZodString>;
1294
1455
  }, z.core.$strip>], "kind">;
1295
1456
  export type RetrainAssistResult = z.infer<typeof RetrainAssistResultSchema>;
1296
- /** The outcome of a lifecycle move owned by the retrain page. */
1297
- export declare const RetrainTransitionResultSchema: z.ZodObject<{
1298
- trackId: z.ZodString;
1299
- retrainStatus: z.ZodEnum<{
1300
- none: "none";
1301
- staging: "staging";
1302
- trained: "trained";
1303
- }>;
1304
- changed: z.ZodBoolean;
1305
- reason: z.ZodOptional<z.ZodEnum<{
1306
- "unknown-track": "unknown-track";
1307
- "no-frames-copied": "no-frames-copied";
1308
- "not-staging": "not-staging";
1309
- "not-trained": "not-trained";
1310
- unchanged: "unchanged";
1311
- }>>;
1312
- }, z.core.$strip>;
1313
- export type RetrainTransitionResult = z.infer<typeof RetrainTransitionResultSchema>;
1314
- declare const RecentTracksQueryInput: z.ZodObject<{
1315
- deviceIds: z.ZodArray<z.ZodNumber>;
1316
- since: z.ZodOptional<z.ZodNumber>;
1317
- until: z.ZodOptional<z.ZodNumber>;
1318
- limit: z.ZodDefault<z.ZodNumber>;
1319
- cursor: z.ZodOptional<z.ZodString>;
1320
- projection: z.ZodOptional<z.ZodEnum<{
1321
- full: "full";
1322
- slim: "slim";
1323
- }>>;
1324
- includeStationary: z.ZodOptional<z.ZodBoolean>;
1325
- classes: z.ZodOptional<z.ZodArray<z.ZodString>>;
1326
- excludeSources: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1327
- sensor: "sensor";
1328
- pipeline: "pipeline";
1329
- audio: "audio";
1330
- onboard: "onboard";
1331
- }>>>;
1457
+ /** A named set over the retrain corpus — membership only, it owns no pixels. */
1458
+ export declare const RetrainCollectionSchema: z.ZodObject<{
1459
+ id: z.ZodString;
1460
+ name: z.ZodString;
1461
+ createdAt: z.ZodNumber;
1462
+ frameCount: z.ZodNumber;
1332
1463
  }, z.core.$strip>;
1333
- export type RecentTracksQuery = z.infer<typeof RecentTracksQueryInput>;
1334
- declare const RecentTracksPageSchema: z.ZodObject<{
1335
- tracks: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1336
- retrainStatus: z.ZodOptional<z.ZodEnum<{
1337
- none: "none";
1338
- staging: "staging";
1339
- trained: "trained";
1340
- }>>;
1341
- markForTrain: z.ZodOptional<z.ZodBoolean>;
1342
- debug: z.ZodOptional<z.ZodBoolean>;
1343
- debugNote: z.ZodOptional<z.ZodString>;
1344
- favourited: z.ZodOptional<z.ZodBoolean>;
1345
- producingDeviceName: z.ZodOptional<z.ZodString>;
1346
- source: z.ZodOptional<z.ZodEnum<{
1347
- sensor: "sensor";
1348
- pipeline: "pipeline";
1349
- audio: "audio";
1350
- onboard: "onboard";
1351
- }>>;
1352
- firstSeen: z.ZodNumber;
1353
- lastSeen: z.ZodNumber;
1354
- positions: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1355
- x: z.ZodNumber;
1356
- y: z.ZodNumber;
1357
- timestamp: z.ZodNumber;
1464
+ export type RetrainCollection = z.infer<typeof RetrainCollectionSchema>;
1465
+ export declare const RetrainCollectionCreateResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1466
+ kind: z.ZodLiteral<"created">;
1467
+ collection: z.ZodObject<{
1468
+ id: z.ZodString;
1469
+ name: z.ZodString;
1470
+ createdAt: z.ZodNumber;
1471
+ frameCount: z.ZodNumber;
1472
+ }, z.core.$strip>;
1473
+ }, z.core.$strip>, z.ZodObject<{
1474
+ kind: z.ZodLiteral<"refused">;
1475
+ reason: z.ZodEnum<{
1476
+ "empty-name": "empty-name";
1477
+ "duplicate-name": "duplicate-name";
1478
+ }>;
1479
+ }, z.core.$strip>], "kind">;
1480
+ export type RetrainCollectionCreateResult = z.infer<typeof RetrainCollectionCreateResultSchema>;
1481
+ export declare const RetrainCollectionRenameResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1482
+ kind: z.ZodLiteral<"renamed">;
1483
+ collection: z.ZodObject<{
1484
+ id: z.ZodString;
1485
+ name: z.ZodString;
1486
+ createdAt: z.ZodNumber;
1487
+ frameCount: z.ZodNumber;
1488
+ }, z.core.$strip>;
1489
+ }, z.core.$strip>, z.ZodObject<{
1490
+ kind: z.ZodLiteral<"refused">;
1491
+ reason: z.ZodEnum<{
1492
+ "empty-name": "empty-name";
1493
+ "duplicate-name": "duplicate-name";
1494
+ "unknown-collection": "unknown-collection";
1495
+ }>;
1496
+ }, z.core.$strip>], "kind">;
1497
+ export type RetrainCollectionRenameResult = z.infer<typeof RetrainCollectionRenameResultSchema>;
1498
+ /**
1499
+ * The outcome of adding the frame at a recording instant. Every refusal is
1500
+ * named: `still-unavailable` (not recording, a gap, or an undecodable frame —
1501
+ * `detail` says which), `still-busy` (the recorder is at its decode bound; try
1502
+ * again), `unreadable-image`, `write-failed`, `unknown-collection`.
1503
+ */
1504
+ export declare const AddRetrainFrameFromRecordingResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1505
+ kind: z.ZodLiteral<"added">;
1506
+ collectionId: z.ZodString;
1507
+ frame: z.ZodObject<{
1508
+ frameId: z.ZodString;
1509
+ deviceId: z.ZodNumber;
1510
+ origin: z.ZodEnum<{
1511
+ recording: "recording";
1512
+ track: "track";
1513
+ }>;
1514
+ trackId: z.ZodOptional<z.ZodString>;
1515
+ sourceMediaId: z.ZodOptional<z.ZodNumber>;
1516
+ epochMs: z.ZodOptional<z.ZodNumber>;
1517
+ sourceKind: z.ZodEnum<{
1518
+ crop: "crop";
1519
+ thumbnail: "thumbnail";
1520
+ snapshot: "snapshot";
1521
+ firstFrame: "firstFrame";
1522
+ lastFrame: "lastFrame";
1523
+ fullFrame: "fullFrame";
1524
+ fullFrameBoxed: "fullFrameBoxed";
1525
+ faceCrop: "faceCrop";
1526
+ plateCrop: "plateCrop";
1527
+ keyFrame: "keyFrame";
1528
+ keyFrameSmall: "keyFrameSmall";
1529
+ thumbnailSmall: "thumbnailSmall";
1530
+ confirmationCrop: "confirmationCrop";
1531
+ debugCrop: "debugCrop";
1532
+ sceneFrame: "sceneFrame";
1533
+ lastSceneFrame: "lastSceneFrame";
1534
+ }>;
1535
+ sizeBytes: z.ZodNumber;
1536
+ width: z.ZodNumber;
1537
+ height: z.ZodNumber;
1538
+ copiedAt: z.ZodNumber;
1539
+ capturedAt: z.ZodOptional<z.ZodNumber>;
1540
+ complete: z.ZodBoolean;
1541
+ pipelineBoxes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
1358
1542
  bbox: z.ZodObject<{
1359
1543
  x: z.ZodNumber;
1360
1544
  y: z.ZodNumber;
1361
1545
  w: z.ZodNumber;
1362
1546
  h: z.ZodNumber;
1363
1547
  }, z.core.$strip>;
1364
- source: z.ZodOptional<z.ZodEnum<{
1365
- frame: "frame";
1366
- recovery: "recovery";
1367
- }>>;
1548
+ macroClass: z.ZodEnum<{
1549
+ person: "person";
1550
+ vehicle: "vehicle";
1551
+ animal: "animal";
1552
+ package: "package";
1553
+ face: "face";
1554
+ plate: "plate";
1555
+ }>;
1556
+ label: z.ZodOptional<z.ZodString>;
1557
+ subLabel: z.ZodOptional<z.ZodString>;
1368
1558
  score: z.ZodOptional<z.ZodNumber>;
1369
- }, z.core.$strip>>>;
1370
- snapshots: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1371
- timestamp: z.ZodNumber;
1372
- position: z.ZodObject<{
1373
- x: z.ZodNumber;
1374
- y: z.ZodNumber;
1375
- timestamp: z.ZodNumber;
1376
- bbox: z.ZodObject<{
1377
- x: z.ZodNumber;
1378
- y: z.ZodNumber;
1379
- w: z.ZodNumber;
1380
- h: z.ZodNumber;
1381
- }, z.core.$strip>;
1382
- source: z.ZodOptional<z.ZodEnum<{
1383
- frame: "frame";
1384
- recovery: "recovery";
1385
- }>>;
1386
- score: z.ZodOptional<z.ZodNumber>;
1387
- }, z.core.$strip>;
1388
- mediaId: z.ZodNumber;
1389
- }, z.core.$strip>>>;
1390
- zonesVisited: z.ZodReadonly<z.ZodArray<z.ZodString>>;
1391
- zoneNames: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
1392
- classes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
1393
- totalDistance: z.ZodNumber;
1394
- state: z.ZodEnum<{
1395
- moving: "moving";
1396
- new: "new";
1397
- entered: "entered";
1398
- left: "left";
1399
- idle: "idle";
1559
+ modelId: z.ZodOptional<z.ZodString>;
1560
+ trackId: z.ZodString;
1561
+ basis: z.ZodEnum<{
1562
+ position: "position";
1563
+ "subject-box": "subject-box";
1564
+ }>;
1565
+ deltaMs: z.ZodNumber;
1566
+ }, z.core.$strip>>>>;
1567
+ collectionIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
1568
+ }, z.core.$strip>;
1569
+ reused: z.ZodBoolean;
1570
+ }, z.core.$strip>, z.ZodObject<{
1571
+ kind: z.ZodLiteral<"refused">;
1572
+ reason: z.ZodEnum<{
1573
+ "unreadable-image": "unreadable-image";
1574
+ "write-failed": "write-failed";
1575
+ "unknown-collection": "unknown-collection";
1576
+ "still-unavailable": "still-unavailable";
1577
+ "still-busy": "still-busy";
1578
+ }>;
1579
+ detail: z.ZodOptional<z.ZodString>;
1580
+ }, z.core.$strip>], "kind">;
1581
+ export type AddRetrainFrameFromRecordingResult = z.infer<typeof AddRetrainFrameFromRecordingResultSchema>;
1582
+ /** A vision LLM profile the AI assist may use, and where it sends the frame. */
1583
+ export declare const RetrainAssistProfileSchema: z.ZodObject<{
1584
+ id: z.ZodString;
1585
+ name: z.ZodString;
1586
+ model: z.ZodString;
1587
+ kind: z.ZodString;
1588
+ leavesHouse: z.ZodBoolean;
1589
+ }, z.core.$strip>;
1590
+ export type RetrainAssistProfile = z.infer<typeof RetrainAssistProfileSchema>;
1591
+ /** A box the AI assist proposed: a draft, plus the model's own reason. */
1592
+ export declare const RetrainLlmProposalSchema: z.ZodObject<{
1593
+ bbox: z.ZodObject<{
1594
+ x: z.ZodNumber;
1595
+ y: z.ZodNumber;
1596
+ w: z.ZodNumber;
1597
+ h: z.ZodNumber;
1598
+ }, z.core.$strip>;
1599
+ kind: z.ZodEnum<{
1600
+ subject: "subject";
1601
+ model_error: "model_error";
1602
+ }>;
1603
+ label: z.ZodOptional<z.ZodString>;
1604
+ source: z.ZodEnum<{
1605
+ operator: "operator";
1606
+ pipeline: "pipeline";
1607
+ assist: "assist";
1608
+ llm: "llm";
1609
+ }>;
1610
+ subLabel: z.ZodOptional<z.ZodString>;
1611
+ macroClass: z.ZodEnum<{
1612
+ person: "person";
1613
+ vehicle: "vehicle";
1614
+ animal: "animal";
1615
+ package: "package";
1616
+ face: "face";
1617
+ plate: "plate";
1618
+ }>;
1619
+ assistModelId: z.ZodOptional<z.ZodString>;
1620
+ assistScore: z.ZodOptional<z.ZodNumber>;
1621
+ reason: z.ZodString;
1622
+ }, z.core.$strip>;
1623
+ export type RetrainLlmProposal = z.infer<typeof RetrainLlmProposalSchema>;
1624
+ /** What the AI assist said about a box that was already on the canvas. */
1625
+ export declare const RetrainLlmReviewSchema: z.ZodObject<{
1626
+ ref: z.ZodString;
1627
+ verdict: z.ZodEnum<{
1628
+ confirmed: "confirmed";
1629
+ "wrong-class": "wrong-class";
1630
+ "not-an-object": "not-an-object";
1631
+ uncertain: "uncertain";
1632
+ }>;
1633
+ suggestedClass: z.ZodOptional<z.ZodEnum<{
1634
+ person: "person";
1635
+ vehicle: "vehicle";
1636
+ animal: "animal";
1637
+ package: "package";
1638
+ face: "face";
1639
+ plate: "plate";
1640
+ }>>;
1641
+ reason: z.ZodString;
1642
+ }, z.core.$strip>;
1643
+ export type RetrainLlmReview = z.infer<typeof RetrainLlmReviewSchema>;
1644
+ /**
1645
+ * The AI assist's answer. `proposed` carries drafts (`source: 'llm'`, the
1646
+ * model and its confidence) and reviews; items the model got wrong (a box off
1647
+ * the frame, an unasked class, an unknown ref) are dropped and counted in
1648
+ * `rejected`. A whole answer that is not the schema is `malformed-answer`.
1649
+ */
1650
+ export declare const RetrainLlmAssistResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1651
+ kind: z.ZodLiteral<"proposed">;
1652
+ profileId: z.ZodString;
1653
+ model: z.ZodString;
1654
+ leftHouse: z.ZodBoolean;
1655
+ proposals: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1656
+ bbox: z.ZodObject<{
1657
+ x: z.ZodNumber;
1658
+ y: z.ZodNumber;
1659
+ w: z.ZodNumber;
1660
+ h: z.ZodNumber;
1661
+ }, z.core.$strip>;
1662
+ kind: z.ZodEnum<{
1663
+ subject: "subject";
1664
+ model_error: "model_error";
1665
+ }>;
1666
+ label: z.ZodOptional<z.ZodString>;
1667
+ source: z.ZodEnum<{
1668
+ operator: "operator";
1669
+ pipeline: "pipeline";
1670
+ assist: "assist";
1671
+ llm: "llm";
1672
+ }>;
1673
+ subLabel: z.ZodOptional<z.ZodString>;
1674
+ macroClass: z.ZodEnum<{
1675
+ person: "person";
1676
+ vehicle: "vehicle";
1677
+ animal: "animal";
1678
+ package: "package";
1679
+ face: "face";
1680
+ plate: "plate";
1681
+ }>;
1682
+ assistModelId: z.ZodOptional<z.ZodString>;
1683
+ assistScore: z.ZodOptional<z.ZodNumber>;
1684
+ reason: z.ZodString;
1685
+ }, z.core.$strip>>>;
1686
+ reviews: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1687
+ ref: z.ZodString;
1688
+ verdict: z.ZodEnum<{
1689
+ confirmed: "confirmed";
1690
+ "wrong-class": "wrong-class";
1691
+ "not-an-object": "not-an-object";
1692
+ uncertain: "uncertain";
1693
+ }>;
1694
+ suggestedClass: z.ZodOptional<z.ZodEnum<{
1695
+ person: "person";
1696
+ vehicle: "vehicle";
1697
+ animal: "animal";
1698
+ package: "package";
1699
+ face: "face";
1700
+ plate: "plate";
1701
+ }>>;
1702
+ reason: z.ZodString;
1703
+ }, z.core.$strip>>>;
1704
+ rejected: z.ZodNumber;
1705
+ }, z.core.$strip>, z.ZodObject<{
1706
+ kind: z.ZodLiteral<"refused">;
1707
+ reason: z.ZodEnum<{
1708
+ "unknown-frame": "unknown-frame";
1709
+ "unreadable-frame": "unreadable-frame";
1710
+ "unknown-profile": "unknown-profile";
1711
+ "profile-disabled": "profile-disabled";
1712
+ "no-vision": "no-vision";
1713
+ "cloud-not-confirmed": "cloud-not-confirmed";
1714
+ "llm-error": "llm-error";
1715
+ "malformed-answer": "malformed-answer";
1716
+ }>;
1717
+ detail: z.ZodOptional<z.ZodString>;
1718
+ }, z.core.$strip>], "kind">;
1719
+ export type RetrainLlmAssistResult = z.infer<typeof RetrainLlmAssistResultSchema>;
1720
+ /** What a dataset version is cut from. Every field narrows. */
1721
+ export declare const RetrainDatasetSelectionSchema: z.ZodObject<{
1722
+ deviceIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodNumber>>>;
1723
+ collectionIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
1724
+ frameIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
1725
+ }, z.core.$strip>;
1726
+ export type RetrainDatasetSelection = z.infer<typeof RetrainDatasetSelectionSchema>;
1727
+ /** The counts a dataset is judged by. */
1728
+ export declare const RetrainDatasetStatsSchema: z.ZodObject<{
1729
+ frames: z.ZodNumber;
1730
+ completeFrames: z.ZodNumber;
1731
+ completeness: z.ZodNumber;
1732
+ subjects: z.ZodNumber;
1733
+ modelErrors: z.ZodNumber;
1734
+ hardNegatives: z.ZodNumber;
1735
+ cells: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1736
+ macroClass: z.ZodString;
1737
+ deviceId: z.ZodNumber;
1738
+ lighting: z.ZodEnum<{
1739
+ unknown: "unknown";
1740
+ day: "day";
1741
+ night: "night";
1742
+ }>;
1743
+ subjects: z.ZodNumber;
1744
+ frames: z.ZodNumber;
1745
+ }, z.core.$strip>>>;
1746
+ cameras: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1747
+ deviceId: z.ZodNumber;
1748
+ frames: z.ZodNumber;
1749
+ completeFrames: z.ZodNumber;
1750
+ }, z.core.$strip>>>;
1751
+ }, z.core.$strip>;
1752
+ export type RetrainDatasetStats = z.infer<typeof RetrainDatasetStatsSchema>;
1753
+ /** An immutable dataset version, without its frame list. */
1754
+ export declare const RetrainDatasetVersionSchema: z.ZodObject<{
1755
+ id: z.ZodString;
1756
+ name: z.ZodString;
1757
+ createdAt: z.ZodNumber;
1758
+ selection: z.ZodObject<{
1759
+ deviceIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodNumber>>>;
1760
+ collectionIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
1761
+ frameIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
1762
+ }, z.core.$strip>;
1763
+ layout: z.ZodEnum<{
1764
+ frames: "frames";
1765
+ crops: "crops";
1766
+ }>;
1767
+ completeOnly: z.ZodBoolean;
1768
+ frameCount: z.ZodNumber;
1769
+ annotationHash: z.ZodString;
1770
+ manifestSchema: z.ZodString;
1771
+ stats: z.ZodObject<{
1772
+ frames: z.ZodNumber;
1773
+ completeFrames: z.ZodNumber;
1774
+ completeness: z.ZodNumber;
1775
+ subjects: z.ZodNumber;
1776
+ modelErrors: z.ZodNumber;
1777
+ hardNegatives: z.ZodNumber;
1778
+ cells: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1779
+ macroClass: z.ZodString;
1780
+ deviceId: z.ZodNumber;
1781
+ lighting: z.ZodEnum<{
1782
+ unknown: "unknown";
1783
+ day: "day";
1784
+ night: "night";
1785
+ }>;
1786
+ subjects: z.ZodNumber;
1787
+ frames: z.ZodNumber;
1788
+ }, z.core.$strip>>>;
1789
+ cameras: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1790
+ deviceId: z.ZodNumber;
1791
+ frames: z.ZodNumber;
1792
+ completeFrames: z.ZodNumber;
1793
+ }, z.core.$strip>>>;
1794
+ }, z.core.$strip>;
1795
+ }, z.core.$strip>;
1796
+ export type RetrainDatasetVersion = z.infer<typeof RetrainDatasetVersionSchema>;
1797
+ export declare const CreateRetrainDatasetVersionResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1798
+ kind: z.ZodLiteral<"created">;
1799
+ version: z.ZodObject<{
1800
+ id: z.ZodString;
1801
+ name: z.ZodString;
1802
+ createdAt: z.ZodNumber;
1803
+ selection: z.ZodObject<{
1804
+ deviceIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodNumber>>>;
1805
+ collectionIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
1806
+ frameIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
1807
+ }, z.core.$strip>;
1808
+ layout: z.ZodEnum<{
1809
+ frames: "frames";
1810
+ crops: "crops";
1811
+ }>;
1812
+ completeOnly: z.ZodBoolean;
1813
+ frameCount: z.ZodNumber;
1814
+ annotationHash: z.ZodString;
1815
+ manifestSchema: z.ZodString;
1816
+ stats: z.ZodObject<{
1817
+ frames: z.ZodNumber;
1818
+ completeFrames: z.ZodNumber;
1819
+ completeness: z.ZodNumber;
1820
+ subjects: z.ZodNumber;
1821
+ modelErrors: z.ZodNumber;
1822
+ hardNegatives: z.ZodNumber;
1823
+ cells: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1824
+ macroClass: z.ZodString;
1825
+ deviceId: z.ZodNumber;
1826
+ lighting: z.ZodEnum<{
1827
+ unknown: "unknown";
1828
+ day: "day";
1829
+ night: "night";
1830
+ }>;
1831
+ subjects: z.ZodNumber;
1832
+ frames: z.ZodNumber;
1833
+ }, z.core.$strip>>>;
1834
+ cameras: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1835
+ deviceId: z.ZodNumber;
1836
+ frames: z.ZodNumber;
1837
+ completeFrames: z.ZodNumber;
1838
+ }, z.core.$strip>>>;
1839
+ }, z.core.$strip>;
1840
+ }, z.core.$strip>;
1841
+ }, z.core.$strip>, z.ZodObject<{
1842
+ kind: z.ZodLiteral<"refused">;
1843
+ reason: z.ZodEnum<{
1844
+ "empty-name": "empty-name";
1845
+ "duplicate-name": "duplicate-name";
1846
+ "no-frames": "no-frames";
1847
+ }>;
1848
+ }, z.core.$strip>], "kind">;
1849
+ export type CreateRetrainDatasetVersionResult = z.infer<typeof CreateRetrainDatasetVersionResultSchema>;
1850
+ /** The outcome of a lifecycle move owned by the retrain page. */
1851
+ export declare const RetrainTransitionResultSchema: z.ZodObject<{
1852
+ trackId: z.ZodString;
1853
+ retrainStatus: z.ZodEnum<{
1854
+ none: "none";
1855
+ staging: "staging";
1856
+ trained: "trained";
1857
+ }>;
1858
+ changed: z.ZodBoolean;
1859
+ reason: z.ZodOptional<z.ZodEnum<{
1860
+ "unknown-track": "unknown-track";
1861
+ "no-frames-copied": "no-frames-copied";
1862
+ "not-staging": "not-staging";
1863
+ "not-trained": "not-trained";
1864
+ unchanged: "unchanged";
1865
+ }>>;
1866
+ }, z.core.$strip>;
1867
+ export type RetrainTransitionResult = z.infer<typeof RetrainTransitionResultSchema>;
1868
+ declare const RecentTracksQueryInput: z.ZodObject<{
1869
+ deviceIds: z.ZodArray<z.ZodNumber>;
1870
+ since: z.ZodOptional<z.ZodNumber>;
1871
+ until: z.ZodOptional<z.ZodNumber>;
1872
+ limit: z.ZodDefault<z.ZodNumber>;
1873
+ cursor: z.ZodOptional<z.ZodString>;
1874
+ projection: z.ZodOptional<z.ZodEnum<{
1875
+ full: "full";
1876
+ slim: "slim";
1877
+ }>>;
1878
+ includeStationary: z.ZodOptional<z.ZodBoolean>;
1879
+ classes: z.ZodOptional<z.ZodArray<z.ZodString>>;
1880
+ excludeSources: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1881
+ sensor: "sensor";
1882
+ pipeline: "pipeline";
1883
+ audio: "audio";
1884
+ onboard: "onboard";
1885
+ }>>>;
1886
+ }, z.core.$strip>;
1887
+ export type RecentTracksQuery = z.infer<typeof RecentTracksQueryInput>;
1888
+ declare const RecentTracksPageSchema: z.ZodObject<{
1889
+ tracks: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1890
+ retrainStatus: z.ZodOptional<z.ZodEnum<{
1891
+ none: "none";
1892
+ staging: "staging";
1893
+ trained: "trained";
1894
+ }>>;
1895
+ markForTrain: z.ZodOptional<z.ZodBoolean>;
1896
+ debug: z.ZodOptional<z.ZodBoolean>;
1897
+ debugNote: z.ZodOptional<z.ZodString>;
1898
+ favourited: z.ZodOptional<z.ZodBoolean>;
1899
+ producingDeviceName: z.ZodOptional<z.ZodString>;
1900
+ source: z.ZodOptional<z.ZodEnum<{
1901
+ sensor: "sensor";
1902
+ pipeline: "pipeline";
1903
+ audio: "audio";
1904
+ onboard: "onboard";
1905
+ }>>;
1906
+ firstSeen: z.ZodNumber;
1907
+ lastSeen: z.ZodNumber;
1908
+ positions: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1909
+ x: z.ZodNumber;
1910
+ y: z.ZodNumber;
1911
+ timestamp: z.ZodNumber;
1912
+ bbox: z.ZodObject<{
1913
+ x: z.ZodNumber;
1914
+ y: z.ZodNumber;
1915
+ w: z.ZodNumber;
1916
+ h: z.ZodNumber;
1917
+ }, z.core.$strip>;
1918
+ source: z.ZodOptional<z.ZodEnum<{
1919
+ frame: "frame";
1920
+ recovery: "recovery";
1921
+ }>>;
1922
+ score: z.ZodOptional<z.ZodNumber>;
1923
+ }, z.core.$strip>>>;
1924
+ snapshots: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1925
+ timestamp: z.ZodNumber;
1926
+ position: z.ZodObject<{
1927
+ x: z.ZodNumber;
1928
+ y: z.ZodNumber;
1929
+ timestamp: z.ZodNumber;
1930
+ bbox: z.ZodObject<{
1931
+ x: z.ZodNumber;
1932
+ y: z.ZodNumber;
1933
+ w: z.ZodNumber;
1934
+ h: z.ZodNumber;
1935
+ }, z.core.$strip>;
1936
+ source: z.ZodOptional<z.ZodEnum<{
1937
+ frame: "frame";
1938
+ recovery: "recovery";
1939
+ }>>;
1940
+ score: z.ZodOptional<z.ZodNumber>;
1941
+ }, z.core.$strip>;
1942
+ mediaId: z.ZodNumber;
1943
+ }, z.core.$strip>>>;
1944
+ zonesVisited: z.ZodReadonly<z.ZodArray<z.ZodString>>;
1945
+ zoneNames: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
1946
+ classes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
1947
+ totalDistance: z.ZodNumber;
1948
+ state: z.ZodEnum<{
1949
+ moving: "moving";
1950
+ new: "new";
1951
+ entered: "entered";
1952
+ left: "left";
1953
+ idle: "idle";
1400
1954
  }>;
1401
1955
  active: z.ZodBoolean;
1402
1956
  importance: z.ZodOptional<z.ZodNumber>;
@@ -3733,8 +4287,13 @@ export declare const pipelineAnalyticsCapability: {
3733
4287
  copies: z.ZodReadonly<z.ZodArray<z.ZodObject<{
3734
4288
  frameId: z.ZodString;
3735
4289
  deviceId: z.ZodNumber;
3736
- trackId: z.ZodString;
3737
- sourceMediaId: z.ZodNumber;
4290
+ origin: z.ZodEnum<{
4291
+ recording: "recording";
4292
+ track: "track";
4293
+ }>;
4294
+ trackId: z.ZodOptional<z.ZodString>;
4295
+ sourceMediaId: z.ZodOptional<z.ZodNumber>;
4296
+ epochMs: z.ZodOptional<z.ZodNumber>;
3738
4297
  sourceKind: z.ZodEnum<{
3739
4298
  crop: "crop";
3740
4299
  thumbnail: "thumbnail";
@@ -3759,6 +4318,33 @@ export declare const pipelineAnalyticsCapability: {
3759
4318
  copiedAt: z.ZodNumber;
3760
4319
  capturedAt: z.ZodOptional<z.ZodNumber>;
3761
4320
  complete: z.ZodBoolean;
4321
+ pipelineBoxes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
4322
+ bbox: z.ZodObject<{
4323
+ x: z.ZodNumber;
4324
+ y: z.ZodNumber;
4325
+ w: z.ZodNumber;
4326
+ h: z.ZodNumber;
4327
+ }, z.core.$strip>;
4328
+ macroClass: z.ZodEnum<{
4329
+ person: "person";
4330
+ vehicle: "vehicle";
4331
+ animal: "animal";
4332
+ package: "package";
4333
+ face: "face";
4334
+ plate: "plate";
4335
+ }>;
4336
+ label: z.ZodOptional<z.ZodString>;
4337
+ subLabel: z.ZodOptional<z.ZodString>;
4338
+ score: z.ZodOptional<z.ZodNumber>;
4339
+ modelId: z.ZodOptional<z.ZodString>;
4340
+ trackId: z.ZodString;
4341
+ basis: z.ZodEnum<{
4342
+ position: "position";
4343
+ "subject-box": "subject-box";
4344
+ }>;
4345
+ deltaMs: z.ZodNumber;
4346
+ }, z.core.$strip>>>>;
4347
+ collectionIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
3762
4348
  }, z.core.$strip>>>;
3763
4349
  autoPickMediaId: z.ZodOptional<z.ZodNumber>;
3764
4350
  }, z.core.$strip>, "query">;
@@ -3784,8 +4370,13 @@ export declare const pipelineAnalyticsCapability: {
3784
4370
  copied: z.ZodReadonly<z.ZodArray<z.ZodObject<{
3785
4371
  frameId: z.ZodString;
3786
4372
  deviceId: z.ZodNumber;
3787
- trackId: z.ZodString;
3788
- sourceMediaId: z.ZodNumber;
4373
+ origin: z.ZodEnum<{
4374
+ recording: "recording";
4375
+ track: "track";
4376
+ }>;
4377
+ trackId: z.ZodOptional<z.ZodString>;
4378
+ sourceMediaId: z.ZodOptional<z.ZodNumber>;
4379
+ epochMs: z.ZodOptional<z.ZodNumber>;
3789
4380
  sourceKind: z.ZodEnum<{
3790
4381
  crop: "crop";
3791
4382
  thumbnail: "thumbnail";
@@ -3810,6 +4401,33 @@ export declare const pipelineAnalyticsCapability: {
3810
4401
  copiedAt: z.ZodNumber;
3811
4402
  capturedAt: z.ZodOptional<z.ZodNumber>;
3812
4403
  complete: z.ZodBoolean;
4404
+ pipelineBoxes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
4405
+ bbox: z.ZodObject<{
4406
+ x: z.ZodNumber;
4407
+ y: z.ZodNumber;
4408
+ w: z.ZodNumber;
4409
+ h: z.ZodNumber;
4410
+ }, z.core.$strip>;
4411
+ macroClass: z.ZodEnum<{
4412
+ person: "person";
4413
+ vehicle: "vehicle";
4414
+ animal: "animal";
4415
+ package: "package";
4416
+ face: "face";
4417
+ plate: "plate";
4418
+ }>;
4419
+ label: z.ZodOptional<z.ZodString>;
4420
+ subLabel: z.ZodOptional<z.ZodString>;
4421
+ score: z.ZodOptional<z.ZodNumber>;
4422
+ modelId: z.ZodOptional<z.ZodString>;
4423
+ trackId: z.ZodString;
4424
+ basis: z.ZodEnum<{
4425
+ position: "position";
4426
+ "subject-box": "subject-box";
4427
+ }>;
4428
+ deltaMs: z.ZodNumber;
4429
+ }, z.core.$strip>>>>;
4430
+ collectionIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
3813
4431
  }, z.core.$strip>>>;
3814
4432
  refused: z.ZodReadonly<z.ZodArray<z.ZodObject<{
3815
4433
  sourceMediaId: z.ZodNumber;
@@ -3825,7 +4443,7 @@ export declare const pipelineAnalyticsCapability: {
3825
4443
  * a frame leaves the dataset before export. */
3826
4444
  readonly deselectRetrainFrame: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
3827
4445
  deviceId: z.ZodNumber;
3828
- trackId: z.ZodString;
4446
+ trackId: z.ZodOptional<z.ZodString>;
3829
4447
  frameId: z.ZodString;
3830
4448
  }, z.core.$strip>, z.ZodObject<{
3831
4449
  removed: z.ZodBoolean;
@@ -3864,7 +4482,7 @@ export declare const pipelineAnalyticsCapability: {
3864
4482
  */
3865
4483
  readonly proposeRetrainAnnotations: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
3866
4484
  deviceId: z.ZodNumber;
3867
- trackId: z.ZodString;
4485
+ trackId: z.ZodOptional<z.ZodString>;
3868
4486
  frameId: z.ZodString;
3869
4487
  subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
3870
4488
  kind: z.ZodLiteral<"package">;
@@ -3899,7 +4517,9 @@ export declare const pipelineAnalyticsCapability: {
3899
4517
  label: z.ZodOptional<z.ZodString>;
3900
4518
  source: z.ZodEnum<{
3901
4519
  operator: "operator";
4520
+ pipeline: "pipeline";
3902
4521
  assist: "assist";
4522
+ llm: "llm";
3903
4523
  }>;
3904
4524
  subLabel: z.ZodOptional<z.ZodString>;
3905
4525
  macroClass: z.ZodEnum<{
@@ -3919,12 +4539,14 @@ export declare const pipelineAnalyticsCapability: {
3919
4539
  reason: z.ZodString;
3920
4540
  detail: z.ZodOptional<z.ZodString>;
3921
4541
  }, z.core.$strip>], "kind">, "mutation">;
3922
- /** Every annotation on a track, oldest first. */
4542
+ /** Every annotation on a track, or on named frames (a recording still has
4543
+ * no track), oldest first. One of the two is required. */
3923
4544
  readonly listRetrainAnnotations: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
3924
- trackId: z.ZodString;
4545
+ trackId: z.ZodOptional<z.ZodString>;
4546
+ frameIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
3925
4547
  }, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
3926
4548
  id: z.ZodString;
3927
- trackId: z.ZodString;
4549
+ trackId: z.ZodOptional<z.ZodString>;
3928
4550
  deviceId: z.ZodNumber;
3929
4551
  mediaKey: z.ZodString;
3930
4552
  bbox: z.ZodObject<{
@@ -3949,7 +4571,9 @@ export declare const pipelineAnalyticsCapability: {
3949
4571
  }>;
3950
4572
  source: z.ZodEnum<{
3951
4573
  operator: "operator";
4574
+ pipeline: "pipeline";
3952
4575
  assist: "assist";
4576
+ llm: "llm";
3953
4577
  }>;
3954
4578
  assistModelId: z.ZodOptional<z.ZodString>;
3955
4579
  assistScore: z.ZodOptional<z.ZodNumber>;
@@ -3971,7 +4595,7 @@ export declare const pipelineAnalyticsCapability: {
3971
4595
  */
3972
4596
  readonly saveRetrainAnnotations: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
3973
4597
  deviceId: z.ZodNumber;
3974
- trackId: z.ZodString;
4598
+ trackId: z.ZodOptional<z.ZodString>;
3975
4599
  frameId: z.ZodString;
3976
4600
  annotations: z.ZodArray<z.ZodObject<{
3977
4601
  bbox: z.ZodObject<{
@@ -3987,7 +4611,9 @@ export declare const pipelineAnalyticsCapability: {
3987
4611
  label: z.ZodOptional<z.ZodString>;
3988
4612
  source: z.ZodEnum<{
3989
4613
  operator: "operator";
4614
+ pipeline: "pipeline";
3990
4615
  assist: "assist";
4616
+ llm: "llm";
3991
4617
  }>;
3992
4618
  subLabel: z.ZodOptional<z.ZodString>;
3993
4619
  macroClass: z.ZodEnum<{
@@ -4003,7 +4629,7 @@ export declare const pipelineAnalyticsCapability: {
4003
4629
  }, z.core.$strip>>;
4004
4630
  }, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
4005
4631
  id: z.ZodString;
4006
- trackId: z.ZodString;
4632
+ trackId: z.ZodOptional<z.ZodString>;
4007
4633
  deviceId: z.ZodNumber;
4008
4634
  mediaKey: z.ZodString;
4009
4635
  bbox: z.ZodObject<{
@@ -4028,7 +4654,9 @@ export declare const pipelineAnalyticsCapability: {
4028
4654
  }>;
4029
4655
  source: z.ZodEnum<{
4030
4656
  operator: "operator";
4657
+ pipeline: "pipeline";
4031
4658
  assist: "assist";
4659
+ llm: "llm";
4032
4660
  }>;
4033
4661
  assistModelId: z.ZodOptional<z.ZodString>;
4034
4662
  assistScore: z.ZodOptional<z.ZodNumber>;
@@ -4107,6 +4735,8 @@ export declare const pipelineAnalyticsCapability: {
4107
4735
  readonly getRetrainExportUrl: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
4108
4736
  deviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
4109
4737
  frameIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
4738
+ collectionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
4739
+ datasetVersionId: z.ZodOptional<z.ZodString>;
4110
4740
  batchId: z.ZodOptional<z.ZodString>;
4111
4741
  completeOnly: z.ZodOptional<z.ZodBoolean>;
4112
4742
  layout: z.ZodOptional<z.ZodEnum<{
@@ -4123,14 +4753,19 @@ export declare const pipelineAnalyticsCapability: {
4123
4753
  */
4124
4754
  readonly setRetrainFrameComplete: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
4125
4755
  deviceId: z.ZodNumber;
4126
- trackId: z.ZodString;
4756
+ trackId: z.ZodOptional<z.ZodString>;
4127
4757
  frameId: z.ZodString;
4128
4758
  complete: z.ZodBoolean;
4129
4759
  }, z.core.$strip>, z.ZodObject<{
4130
4760
  frameId: z.ZodString;
4131
4761
  deviceId: z.ZodNumber;
4132
- trackId: z.ZodString;
4133
- sourceMediaId: z.ZodNumber;
4762
+ origin: z.ZodEnum<{
4763
+ recording: "recording";
4764
+ track: "track";
4765
+ }>;
4766
+ trackId: z.ZodOptional<z.ZodString>;
4767
+ sourceMediaId: z.ZodOptional<z.ZodNumber>;
4768
+ epochMs: z.ZodOptional<z.ZodNumber>;
4134
4769
  sourceKind: z.ZodEnum<{
4135
4770
  crop: "crop";
4136
4771
  thumbnail: "thumbnail";
@@ -4155,6 +4790,33 @@ export declare const pipelineAnalyticsCapability: {
4155
4790
  copiedAt: z.ZodNumber;
4156
4791
  capturedAt: z.ZodOptional<z.ZodNumber>;
4157
4792
  complete: z.ZodBoolean;
4793
+ pipelineBoxes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
4794
+ bbox: z.ZodObject<{
4795
+ x: z.ZodNumber;
4796
+ y: z.ZodNumber;
4797
+ w: z.ZodNumber;
4798
+ h: z.ZodNumber;
4799
+ }, z.core.$strip>;
4800
+ macroClass: z.ZodEnum<{
4801
+ person: "person";
4802
+ vehicle: "vehicle";
4803
+ animal: "animal";
4804
+ package: "package";
4805
+ face: "face";
4806
+ plate: "plate";
4807
+ }>;
4808
+ label: z.ZodOptional<z.ZodString>;
4809
+ subLabel: z.ZodOptional<z.ZodString>;
4810
+ score: z.ZodOptional<z.ZodNumber>;
4811
+ modelId: z.ZodOptional<z.ZodString>;
4812
+ trackId: z.ZodString;
4813
+ basis: z.ZodEnum<{
4814
+ position: "position";
4815
+ "subject-box": "subject-box";
4816
+ }>;
4817
+ deltaMs: z.ZodNumber;
4818
+ }, z.core.$strip>>>>;
4819
+ collectionIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
4158
4820
  }, z.core.$strip>, "mutation">;
4159
4821
  /**
4160
4822
  * Stream the annotated archive to a TARGET instead of a browser — the
@@ -4167,6 +4829,8 @@ export declare const pipelineAnalyticsCapability: {
4167
4829
  filter: z.ZodObject<{
4168
4830
  deviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
4169
4831
  frameIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
4832
+ collectionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
4833
+ datasetVersionId: z.ZodOptional<z.ZodString>;
4170
4834
  batchId: z.ZodOptional<z.ZodString>;
4171
4835
  completeOnly: z.ZodOptional<z.ZodBoolean>;
4172
4836
  }, z.core.$strip>;
@@ -4193,6 +4857,515 @@ export declare const pipelineAnalyticsCapability: {
4193
4857
  sha256: z.ZodString;
4194
4858
  status: z.ZodNumber;
4195
4859
  }, z.core.$strip>, "mutation">;
4860
+ /** The counts a selection would freeze — class × camera × day/night,
4861
+ * completeness — without freezing anything. Index reads only. */
4862
+ readonly previewRetrainDataset: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
4863
+ selection: z.ZodObject<{
4864
+ deviceIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodNumber>>>;
4865
+ collectionIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
4866
+ frameIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
4867
+ }, z.core.$strip>;
4868
+ completeOnly: z.ZodOptional<z.ZodBoolean>;
4869
+ }, z.core.$strip>, z.ZodObject<{
4870
+ frames: z.ZodNumber;
4871
+ completeFrames: z.ZodNumber;
4872
+ completeness: z.ZodNumber;
4873
+ subjects: z.ZodNumber;
4874
+ modelErrors: z.ZodNumber;
4875
+ hardNegatives: z.ZodNumber;
4876
+ cells: z.ZodReadonly<z.ZodArray<z.ZodObject<{
4877
+ macroClass: z.ZodString;
4878
+ deviceId: z.ZodNumber;
4879
+ lighting: z.ZodEnum<{
4880
+ unknown: "unknown";
4881
+ day: "day";
4882
+ night: "night";
4883
+ }>;
4884
+ subjects: z.ZodNumber;
4885
+ frames: z.ZodNumber;
4886
+ }, z.core.$strip>>>;
4887
+ cameras: z.ZodReadonly<z.ZodArray<z.ZodObject<{
4888
+ deviceId: z.ZodNumber;
4889
+ frames: z.ZodNumber;
4890
+ completeFrames: z.ZodNumber;
4891
+ }, z.core.$strip>>>;
4892
+ }, z.core.$strip>, "query">;
4893
+ /**
4894
+ * Freeze a dataset version: the frames the selection yields (the same plan
4895
+ * the annotated export builds), the hash of what they teach, the export
4896
+ * parameters and the counts. Immutable — a different selection is a new
4897
+ * version. Export it with `getRetrainExportUrl({ datasetVersionId })`.
4898
+ */
4899
+ readonly createRetrainDatasetVersion: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
4900
+ name: z.ZodString;
4901
+ selection: z.ZodObject<{
4902
+ deviceIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodNumber>>>;
4903
+ collectionIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
4904
+ frameIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
4905
+ }, z.core.$strip>;
4906
+ layout: z.ZodEnum<{
4907
+ frames: "frames";
4908
+ crops: "crops";
4909
+ }>;
4910
+ completeOnly: z.ZodBoolean;
4911
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
4912
+ kind: z.ZodLiteral<"created">;
4913
+ version: z.ZodObject<{
4914
+ id: z.ZodString;
4915
+ name: z.ZodString;
4916
+ createdAt: z.ZodNumber;
4917
+ selection: z.ZodObject<{
4918
+ deviceIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodNumber>>>;
4919
+ collectionIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
4920
+ frameIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
4921
+ }, z.core.$strip>;
4922
+ layout: z.ZodEnum<{
4923
+ frames: "frames";
4924
+ crops: "crops";
4925
+ }>;
4926
+ completeOnly: z.ZodBoolean;
4927
+ frameCount: z.ZodNumber;
4928
+ annotationHash: z.ZodString;
4929
+ manifestSchema: z.ZodString;
4930
+ stats: z.ZodObject<{
4931
+ frames: z.ZodNumber;
4932
+ completeFrames: z.ZodNumber;
4933
+ completeness: z.ZodNumber;
4934
+ subjects: z.ZodNumber;
4935
+ modelErrors: z.ZodNumber;
4936
+ hardNegatives: z.ZodNumber;
4937
+ cells: z.ZodReadonly<z.ZodArray<z.ZodObject<{
4938
+ macroClass: z.ZodString;
4939
+ deviceId: z.ZodNumber;
4940
+ lighting: z.ZodEnum<{
4941
+ unknown: "unknown";
4942
+ day: "day";
4943
+ night: "night";
4944
+ }>;
4945
+ subjects: z.ZodNumber;
4946
+ frames: z.ZodNumber;
4947
+ }, z.core.$strip>>>;
4948
+ cameras: z.ZodReadonly<z.ZodArray<z.ZodObject<{
4949
+ deviceId: z.ZodNumber;
4950
+ frames: z.ZodNumber;
4951
+ completeFrames: z.ZodNumber;
4952
+ }, z.core.$strip>>>;
4953
+ }, z.core.$strip>;
4954
+ }, z.core.$strip>;
4955
+ }, z.core.$strip>, z.ZodObject<{
4956
+ kind: z.ZodLiteral<"refused">;
4957
+ reason: z.ZodEnum<{
4958
+ "empty-name": "empty-name";
4959
+ "duplicate-name": "duplicate-name";
4960
+ "no-frames": "no-frames";
4961
+ }>;
4962
+ }, z.core.$strip>], "kind">, "mutation">;
4963
+ /** Every dataset version, newest first. */
4964
+ readonly listRetrainDatasetVersions: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
4965
+ id: z.ZodString;
4966
+ name: z.ZodString;
4967
+ createdAt: z.ZodNumber;
4968
+ selection: z.ZodObject<{
4969
+ deviceIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodNumber>>>;
4970
+ collectionIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
4971
+ frameIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
4972
+ }, z.core.$strip>;
4973
+ layout: z.ZodEnum<{
4974
+ frames: "frames";
4975
+ crops: "crops";
4976
+ }>;
4977
+ completeOnly: z.ZodBoolean;
4978
+ frameCount: z.ZodNumber;
4979
+ annotationHash: z.ZodString;
4980
+ manifestSchema: z.ZodString;
4981
+ stats: z.ZodObject<{
4982
+ frames: z.ZodNumber;
4983
+ completeFrames: z.ZodNumber;
4984
+ completeness: z.ZodNumber;
4985
+ subjects: z.ZodNumber;
4986
+ modelErrors: z.ZodNumber;
4987
+ hardNegatives: z.ZodNumber;
4988
+ cells: z.ZodReadonly<z.ZodArray<z.ZodObject<{
4989
+ macroClass: z.ZodString;
4990
+ deviceId: z.ZodNumber;
4991
+ lighting: z.ZodEnum<{
4992
+ unknown: "unknown";
4993
+ day: "day";
4994
+ night: "night";
4995
+ }>;
4996
+ subjects: z.ZodNumber;
4997
+ frames: z.ZodNumber;
4998
+ }, z.core.$strip>>>;
4999
+ cameras: z.ZodReadonly<z.ZodArray<z.ZodObject<{
5000
+ deviceId: z.ZodNumber;
5001
+ frames: z.ZodNumber;
5002
+ completeFrames: z.ZodNumber;
5003
+ }, z.core.$strip>>>;
5004
+ }, z.core.$strip>;
5005
+ }, z.core.$strip>>>, "query">;
5006
+ /** Delete a version. Its frames stay in the dataset. */
5007
+ readonly deleteRetrainDatasetVersion: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
5008
+ id: z.ZodString;
5009
+ }, z.core.$strip>, z.ZodObject<{
5010
+ deleted: z.ZodBoolean;
5011
+ }, z.core.$strip>, "mutation">;
5012
+ /** Does the corpus still teach what the version froze? `missingFrames`
5013
+ * counts frames that left the dataset (or lost every box and tick). */
5014
+ readonly verifyRetrainDatasetVersion: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
5015
+ id: z.ZodString;
5016
+ }, z.core.$strip>, z.ZodObject<{
5017
+ found: z.ZodBoolean;
5018
+ annotationHash: z.ZodString;
5019
+ matches: z.ZodBoolean;
5020
+ missingFrames: z.ZodNumber;
5021
+ }, z.core.$strip>, "query">;
5022
+ /** The enabled, vision-capable LLM profiles, each saying whether a frame
5023
+ * sent to it leaves the house. */
5024
+ readonly listRetrainAssistProfiles: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
5025
+ id: z.ZodString;
5026
+ name: z.ZodString;
5027
+ model: z.ZodString;
5028
+ kind: z.ZodString;
5029
+ leavesHouse: z.ZodBoolean;
5030
+ }, z.core.$strip>>>, "query">;
5031
+ /**
5032
+ * Ask a vision LLM (the `llm` capability) about ONE copied frame: list the
5033
+ * objects of `classes` with boxes, and review the boxes already on the
5034
+ * canvas (sent by `ref`). Answers drafts (`source: 'llm'`) and reviews —
5035
+ * nothing is stored, nothing is accepted. A profile that sends the frame
5036
+ * outside the house is refused unless `allowCloud` says the operator
5037
+ * confirmed this run.
5038
+ */
5039
+ readonly proposeRetrainAnnotationsWithLlm: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
5040
+ deviceId: z.ZodNumber;
5041
+ trackId: z.ZodOptional<z.ZodString>;
5042
+ frameId: z.ZodString;
5043
+ profileId: z.ZodString;
5044
+ classes: z.ZodArray<z.ZodEnum<{
5045
+ person: "person";
5046
+ vehicle: "vehicle";
5047
+ animal: "animal";
5048
+ package: "package";
5049
+ face: "face";
5050
+ plate: "plate";
5051
+ }>>;
5052
+ boxes: z.ZodArray<z.ZodObject<{
5053
+ ref: z.ZodString;
5054
+ bbox: z.ZodObject<{
5055
+ x: z.ZodNumber;
5056
+ y: z.ZodNumber;
5057
+ w: z.ZodNumber;
5058
+ h: z.ZodNumber;
5059
+ }, z.core.$strip>;
5060
+ macroClass: z.ZodEnum<{
5061
+ person: "person";
5062
+ vehicle: "vehicle";
5063
+ animal: "animal";
5064
+ package: "package";
5065
+ face: "face";
5066
+ plate: "plate";
5067
+ }>;
5068
+ label: z.ZodOptional<z.ZodString>;
5069
+ }, z.core.$strip>>;
5070
+ allowCloud: z.ZodBoolean;
5071
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
5072
+ kind: z.ZodLiteral<"proposed">;
5073
+ profileId: z.ZodString;
5074
+ model: z.ZodString;
5075
+ leftHouse: z.ZodBoolean;
5076
+ proposals: z.ZodReadonly<z.ZodArray<z.ZodObject<{
5077
+ bbox: z.ZodObject<{
5078
+ x: z.ZodNumber;
5079
+ y: z.ZodNumber;
5080
+ w: z.ZodNumber;
5081
+ h: z.ZodNumber;
5082
+ }, z.core.$strip>;
5083
+ kind: z.ZodEnum<{
5084
+ subject: "subject";
5085
+ model_error: "model_error";
5086
+ }>;
5087
+ label: z.ZodOptional<z.ZodString>;
5088
+ source: z.ZodEnum<{
5089
+ operator: "operator";
5090
+ pipeline: "pipeline";
5091
+ assist: "assist";
5092
+ llm: "llm";
5093
+ }>;
5094
+ subLabel: z.ZodOptional<z.ZodString>;
5095
+ macroClass: z.ZodEnum<{
5096
+ person: "person";
5097
+ vehicle: "vehicle";
5098
+ animal: "animal";
5099
+ package: "package";
5100
+ face: "face";
5101
+ plate: "plate";
5102
+ }>;
5103
+ assistModelId: z.ZodOptional<z.ZodString>;
5104
+ assistScore: z.ZodOptional<z.ZodNumber>;
5105
+ reason: z.ZodString;
5106
+ }, z.core.$strip>>>;
5107
+ reviews: z.ZodReadonly<z.ZodArray<z.ZodObject<{
5108
+ ref: z.ZodString;
5109
+ verdict: z.ZodEnum<{
5110
+ confirmed: "confirmed";
5111
+ "wrong-class": "wrong-class";
5112
+ "not-an-object": "not-an-object";
5113
+ uncertain: "uncertain";
5114
+ }>;
5115
+ suggestedClass: z.ZodOptional<z.ZodEnum<{
5116
+ person: "person";
5117
+ vehicle: "vehicle";
5118
+ animal: "animal";
5119
+ package: "package";
5120
+ face: "face";
5121
+ plate: "plate";
5122
+ }>>;
5123
+ reason: z.ZodString;
5124
+ }, z.core.$strip>>>;
5125
+ rejected: z.ZodNumber;
5126
+ }, z.core.$strip>, z.ZodObject<{
5127
+ kind: z.ZodLiteral<"refused">;
5128
+ reason: z.ZodEnum<{
5129
+ "unknown-frame": "unknown-frame";
5130
+ "unreadable-frame": "unreadable-frame";
5131
+ "unknown-profile": "unknown-profile";
5132
+ "profile-disabled": "profile-disabled";
5133
+ "no-vision": "no-vision";
5134
+ "cloud-not-confirmed": "cloud-not-confirmed";
5135
+ "llm-error": "llm-error";
5136
+ "malformed-answer": "malformed-answer";
5137
+ }>;
5138
+ detail: z.ZodOptional<z.ZodString>;
5139
+ }, z.core.$strip>], "kind">, "mutation">;
5140
+ /**
5141
+ * Create a named collection — a set over the retrain corpus ("packages
5142
+ * porch night"). Names are unique case-insensitively and never empty;
5143
+ * both refusals are named.
5144
+ */
5145
+ readonly createRetrainCollection: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
5146
+ name: z.ZodString;
5147
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
5148
+ kind: z.ZodLiteral<"created">;
5149
+ collection: z.ZodObject<{
5150
+ id: z.ZodString;
5151
+ name: z.ZodString;
5152
+ createdAt: z.ZodNumber;
5153
+ frameCount: z.ZodNumber;
5154
+ }, z.core.$strip>;
5155
+ }, z.core.$strip>, z.ZodObject<{
5156
+ kind: z.ZodLiteral<"refused">;
5157
+ reason: z.ZodEnum<{
5158
+ "empty-name": "empty-name";
5159
+ "duplicate-name": "duplicate-name";
5160
+ }>;
5161
+ }, z.core.$strip>], "kind">, "mutation">;
5162
+ /** Every collection, newest first, with its frame count. */
5163
+ readonly listRetrainCollections: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
5164
+ id: z.ZodString;
5165
+ name: z.ZodString;
5166
+ createdAt: z.ZodNumber;
5167
+ frameCount: z.ZodNumber;
5168
+ }, z.core.$strip>>>, "query">;
5169
+ readonly renameRetrainCollection: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
5170
+ id: z.ZodString;
5171
+ name: z.ZodString;
5172
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
5173
+ kind: z.ZodLiteral<"renamed">;
5174
+ collection: z.ZodObject<{
5175
+ id: z.ZodString;
5176
+ name: z.ZodString;
5177
+ createdAt: z.ZodNumber;
5178
+ frameCount: z.ZodNumber;
5179
+ }, z.core.$strip>;
5180
+ }, z.core.$strip>, z.ZodObject<{
5181
+ kind: z.ZodLiteral<"refused">;
5182
+ reason: z.ZodEnum<{
5183
+ "empty-name": "empty-name";
5184
+ "duplicate-name": "duplicate-name";
5185
+ "unknown-collection": "unknown-collection";
5186
+ }>;
5187
+ }, z.core.$strip>], "kind">, "mutation">;
5188
+ /**
5189
+ * Delete a collection. Its recording stills that no other collection
5190
+ * holds are deleted with their annotations (nothing else reaches them);
5191
+ * frames copied from tracks always stay in the dataset.
5192
+ */
5193
+ readonly deleteRetrainCollection: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
5194
+ id: z.ZodString;
5195
+ }, z.core.$strip>, z.ZodObject<{
5196
+ deleted: z.ZodBoolean;
5197
+ removedFrames: z.ZodNumber;
5198
+ }, z.core.$strip>, "mutation">;
5199
+ /**
5200
+ * Add the frame at a recording instant to a collection — the frame the
5201
+ * model may have seen NOTHING in. The recorder re-decodes the native
5202
+ * frame at `epochMs`; the dataset copies it (trackless, durable). The same
5203
+ * moment twice is one copy. Every refusal is named.
5204
+ */
5205
+ readonly addRetrainFrameFromRecording: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
5206
+ collectionId: z.ZodString;
5207
+ deviceId: z.ZodNumber;
5208
+ epochMs: z.ZodNumber;
5209
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
5210
+ kind: z.ZodLiteral<"added">;
5211
+ collectionId: z.ZodString;
5212
+ frame: z.ZodObject<{
5213
+ frameId: z.ZodString;
5214
+ deviceId: z.ZodNumber;
5215
+ origin: z.ZodEnum<{
5216
+ recording: "recording";
5217
+ track: "track";
5218
+ }>;
5219
+ trackId: z.ZodOptional<z.ZodString>;
5220
+ sourceMediaId: z.ZodOptional<z.ZodNumber>;
5221
+ epochMs: z.ZodOptional<z.ZodNumber>;
5222
+ sourceKind: z.ZodEnum<{
5223
+ crop: "crop";
5224
+ thumbnail: "thumbnail";
5225
+ snapshot: "snapshot";
5226
+ firstFrame: "firstFrame";
5227
+ lastFrame: "lastFrame";
5228
+ fullFrame: "fullFrame";
5229
+ fullFrameBoxed: "fullFrameBoxed";
5230
+ faceCrop: "faceCrop";
5231
+ plateCrop: "plateCrop";
5232
+ keyFrame: "keyFrame";
5233
+ keyFrameSmall: "keyFrameSmall";
5234
+ thumbnailSmall: "thumbnailSmall";
5235
+ confirmationCrop: "confirmationCrop";
5236
+ debugCrop: "debugCrop";
5237
+ sceneFrame: "sceneFrame";
5238
+ lastSceneFrame: "lastSceneFrame";
5239
+ }>;
5240
+ sizeBytes: z.ZodNumber;
5241
+ width: z.ZodNumber;
5242
+ height: z.ZodNumber;
5243
+ copiedAt: z.ZodNumber;
5244
+ capturedAt: z.ZodOptional<z.ZodNumber>;
5245
+ complete: z.ZodBoolean;
5246
+ pipelineBoxes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
5247
+ bbox: z.ZodObject<{
5248
+ x: z.ZodNumber;
5249
+ y: z.ZodNumber;
5250
+ w: z.ZodNumber;
5251
+ h: z.ZodNumber;
5252
+ }, z.core.$strip>;
5253
+ macroClass: z.ZodEnum<{
5254
+ person: "person";
5255
+ vehicle: "vehicle";
5256
+ animal: "animal";
5257
+ package: "package";
5258
+ face: "face";
5259
+ plate: "plate";
5260
+ }>;
5261
+ label: z.ZodOptional<z.ZodString>;
5262
+ subLabel: z.ZodOptional<z.ZodString>;
5263
+ score: z.ZodOptional<z.ZodNumber>;
5264
+ modelId: z.ZodOptional<z.ZodString>;
5265
+ trackId: z.ZodString;
5266
+ basis: z.ZodEnum<{
5267
+ position: "position";
5268
+ "subject-box": "subject-box";
5269
+ }>;
5270
+ deltaMs: z.ZodNumber;
5271
+ }, z.core.$strip>>>>;
5272
+ collectionIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
5273
+ }, z.core.$strip>;
5274
+ reused: z.ZodBoolean;
5275
+ }, z.core.$strip>, z.ZodObject<{
5276
+ kind: z.ZodLiteral<"refused">;
5277
+ reason: z.ZodEnum<{
5278
+ "unreadable-image": "unreadable-image";
5279
+ "write-failed": "write-failed";
5280
+ "unknown-collection": "unknown-collection";
5281
+ "still-unavailable": "still-unavailable";
5282
+ "still-busy": "still-busy";
5283
+ }>;
5284
+ detail: z.ZodOptional<z.ZodString>;
5285
+ }, z.core.$strip>], "kind">, "mutation">;
5286
+ /** Add frames already in the dataset to a collection. */
5287
+ readonly addRetrainFramesToCollection: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
5288
+ collectionId: z.ZodString;
5289
+ frameIds: z.ZodArray<z.ZodString>;
5290
+ }, z.core.$strip>, z.ZodObject<{
5291
+ added: z.ZodNumber;
5292
+ alreadyMember: z.ZodNumber;
5293
+ unknownFrameIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
5294
+ }, z.core.$strip>, "mutation">;
5295
+ /** Remove a frame from a collection. A recording still left in no
5296
+ * collection is deleted with its annotations (`deletedFrame`). */
5297
+ readonly removeRetrainFrameFromCollection: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
5298
+ collectionId: z.ZodString;
5299
+ frameId: z.ZodString;
5300
+ }, z.core.$strip>, z.ZodObject<{
5301
+ removed: z.ZodBoolean;
5302
+ deletedFrame: z.ZodBoolean;
5303
+ }, z.core.$strip>, "mutation">;
5304
+ /** The frames of a collection, with their pipeline boxes. */
5305
+ readonly listRetrainCollectionFrames: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
5306
+ collectionId: z.ZodString;
5307
+ }, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
5308
+ frameId: z.ZodString;
5309
+ deviceId: z.ZodNumber;
5310
+ origin: z.ZodEnum<{
5311
+ recording: "recording";
5312
+ track: "track";
5313
+ }>;
5314
+ trackId: z.ZodOptional<z.ZodString>;
5315
+ sourceMediaId: z.ZodOptional<z.ZodNumber>;
5316
+ epochMs: z.ZodOptional<z.ZodNumber>;
5317
+ sourceKind: z.ZodEnum<{
5318
+ crop: "crop";
5319
+ thumbnail: "thumbnail";
5320
+ snapshot: "snapshot";
5321
+ firstFrame: "firstFrame";
5322
+ lastFrame: "lastFrame";
5323
+ fullFrame: "fullFrame";
5324
+ fullFrameBoxed: "fullFrameBoxed";
5325
+ faceCrop: "faceCrop";
5326
+ plateCrop: "plateCrop";
5327
+ keyFrame: "keyFrame";
5328
+ keyFrameSmall: "keyFrameSmall";
5329
+ thumbnailSmall: "thumbnailSmall";
5330
+ confirmationCrop: "confirmationCrop";
5331
+ debugCrop: "debugCrop";
5332
+ sceneFrame: "sceneFrame";
5333
+ lastSceneFrame: "lastSceneFrame";
5334
+ }>;
5335
+ sizeBytes: z.ZodNumber;
5336
+ width: z.ZodNumber;
5337
+ height: z.ZodNumber;
5338
+ copiedAt: z.ZodNumber;
5339
+ capturedAt: z.ZodOptional<z.ZodNumber>;
5340
+ complete: z.ZodBoolean;
5341
+ pipelineBoxes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
5342
+ bbox: z.ZodObject<{
5343
+ x: z.ZodNumber;
5344
+ y: z.ZodNumber;
5345
+ w: z.ZodNumber;
5346
+ h: z.ZodNumber;
5347
+ }, z.core.$strip>;
5348
+ macroClass: z.ZodEnum<{
5349
+ person: "person";
5350
+ vehicle: "vehicle";
5351
+ animal: "animal";
5352
+ package: "package";
5353
+ face: "face";
5354
+ plate: "plate";
5355
+ }>;
5356
+ label: z.ZodOptional<z.ZodString>;
5357
+ subLabel: z.ZodOptional<z.ZodString>;
5358
+ score: z.ZodOptional<z.ZodNumber>;
5359
+ modelId: z.ZodOptional<z.ZodString>;
5360
+ trackId: z.ZodString;
5361
+ basis: z.ZodEnum<{
5362
+ position: "position";
5363
+ "subject-box": "subject-box";
5364
+ }>;
5365
+ deltaMs: z.ZodNumber;
5366
+ }, z.core.$strip>>>>;
5367
+ collectionIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
5368
+ }, z.core.$strip>>>, "query">;
4196
5369
  /**
4197
5370
  * The media an EVENT owns.
4198
5371
  *