@camstack/types 1.2.357 → 1.2.359

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.mjs CHANGED
@@ -99,6 +99,202 @@ var PeerBytesTicketSchema = z.object({
99
99
  declaredBytes: z.number().int().nonnegative().nullable()
100
100
  });
101
101
  //#endregion
102
+ //#region src/retrain-review.ts
103
+ /** Every status, in the order a summary lists them. */
104
+ var RETRAIN_REVIEW_STATUSES = [
105
+ "unchanged",
106
+ "adjusted",
107
+ "reclassified",
108
+ "added",
109
+ "removed",
110
+ "model-error"
111
+ ];
112
+ /**
113
+ * Two boxes overlapping at least this much are the same subject when a legacy
114
+ * row (no origin) is matched against a proposal. Deliberately loose: a legacy
115
+ * row is judged on evidence that is no longer exact.
116
+ */
117
+ var RETRAIN_REVIEW_MATCH_IOU = .5;
118
+ /**
119
+ * A kept box overlapping its origin at least this much is `unchanged`; below it
120
+ * the rectangle was moved or resized on purpose (`adjusted`). Not 1.0: the
121
+ * canvas rounds, and a box dragged by one pixel and dragged back is not an edit.
122
+ */
123
+ var RETRAIN_REVIEW_ADJUSTED_IOU = .95;
124
+ /** Two boxes this close on every edge are the same rectangle (an exact match). */
125
+ var EXACT_EDGE_EPSILON = 1e-6;
126
+ /** Intersection over union of two normalised rectangles. */
127
+ function retrainBoxIou(a, b) {
128
+ const inter = Math.max(0, Math.min(a.x + a.w, b.x + b.w) - Math.max(a.x, b.x)) * Math.max(0, Math.min(a.y + a.h, b.y + b.h) - Math.max(a.y, b.y));
129
+ const union = a.w * a.h + b.w * b.h - inter;
130
+ return union > 0 ? inter / union : 0;
131
+ }
132
+ function sameRect(a, b) {
133
+ return Math.abs(a.x - b.x) <= EXACT_EDGE_EPSILON && Math.abs(a.y - b.y) <= EXACT_EDGE_EPSILON && Math.abs(a.w - b.w) <= EXACT_EDGE_EPSILON && Math.abs(a.h - b.h) <= EXACT_EDGE_EPSILON;
134
+ }
135
+ function labelOf(value) {
136
+ return value?.trim() ?? "";
137
+ }
138
+ /** Kept box versus its baseline: class/label first, then geometry. */
139
+ function compareKept(saved, baseline, adjustedIou) {
140
+ const iou = retrainBoxIou(saved.bbox, baseline.bbox);
141
+ if (saved.macroClass !== baseline.macroClass || labelOf(saved.label) !== labelOf(baseline.label)) return {
142
+ status: "reclassified",
143
+ iou
144
+ };
145
+ return {
146
+ status: iou < adjustedIou ? "adjusted" : "unchanged",
147
+ iou
148
+ };
149
+ }
150
+ /**
151
+ * Pair legacy rows with proposals: exact rectangles first, then by descending
152
+ * overlap, one proposal per row. Greedy on a sorted list so the result does not
153
+ * depend on the order the rows were listed in.
154
+ */
155
+ function pairLegacy(saved, legacyIndexes, origins, matchIou) {
156
+ const candidates = [];
157
+ for (const savedIndex of legacyIndexes) {
158
+ const box = saved[savedIndex];
159
+ if (box === void 0) continue;
160
+ origins.forEach((origin, originIndex) => {
161
+ const exact = sameRect(box.bbox, origin.bbox);
162
+ const iou = exact ? 1 : retrainBoxIou(box.bbox, origin.bbox);
163
+ if (exact || iou >= matchIou) candidates.push({
164
+ savedIndex,
165
+ originIndex,
166
+ iou,
167
+ exact
168
+ });
169
+ });
170
+ }
171
+ candidates.sort((a, b) => Number(b.exact) - Number(a.exact) || b.iou - a.iou);
172
+ const pairs = /* @__PURE__ */ new Map();
173
+ const takenOrigins = /* @__PURE__ */ new Set();
174
+ for (const c of candidates) {
175
+ if (pairs.has(c.savedIndex) || takenOrigins.has(c.originIndex)) continue;
176
+ pairs.set(c.savedIndex, c.originIndex);
177
+ takenOrigins.add(c.originIndex);
178
+ }
179
+ return pairs;
180
+ }
181
+ /**
182
+ * Classify what the operator did on ONE frame.
183
+ *
184
+ * @param saved the frame's saved boxes.
185
+ * @param origins the proposals known now (the pipeline's boxes, re-derived) —
186
+ * consulted ONLY for rows that carry no origin snapshot.
187
+ * @param dismissed the proposals the operator deleted, with their snapshots.
188
+ */
189
+ function classifyRetrainReview(saved, origins, dismissed, opts = {}) {
190
+ const matchIou = opts.matchIou ?? .5;
191
+ const adjustedIou = opts.adjustedIou ?? .95;
192
+ const claimedRefs = /* @__PURE__ */ new Set();
193
+ const boxes = [];
194
+ const legacyIndexes = [];
195
+ saved.forEach((box, index) => {
196
+ if (box.origin === null) legacyIndexes.push(index);
197
+ else claimedRefs.add(box.origin.ref);
198
+ });
199
+ for (const entry of dismissed) claimedRefs.add(entry.ref);
200
+ const legacyPairs = pairLegacy(saved, legacyIndexes, origins, matchIou);
201
+ for (const originIndex of legacyPairs.values()) {
202
+ const origin = origins[originIndex];
203
+ if (origin !== void 0) claimedRefs.add(origin.ref);
204
+ }
205
+ saved.forEach((box, index) => {
206
+ const exactBaseline = box.origin;
207
+ const pairedOrigin = exactBaseline === null ? origins[legacyPairs.get(index) ?? -1] : void 0;
208
+ const baseline = exactBaseline ?? pairedOrigin ?? null;
209
+ const approximate = exactBaseline === null;
210
+ if (box.kind === "model_error") {
211
+ boxes.push({
212
+ ref: box.id,
213
+ savedId: box.id,
214
+ status: "model-error",
215
+ approximate: false,
216
+ ...baseline !== null ? {
217
+ origin: baseline,
218
+ iou: retrainBoxIou(box.bbox, baseline.bbox)
219
+ } : {}
220
+ });
221
+ return;
222
+ }
223
+ if (baseline === null || baseline.source === "operator") {
224
+ boxes.push({
225
+ ref: box.id,
226
+ savedId: box.id,
227
+ status: "added",
228
+ approximate: approximate && baseline === null,
229
+ ...baseline !== null ? { origin: baseline } : {}
230
+ });
231
+ return;
232
+ }
233
+ const verdict = compareKept(box, baseline, adjustedIou);
234
+ boxes.push({
235
+ ref: box.id,
236
+ savedId: box.id,
237
+ status: verdict.status,
238
+ approximate,
239
+ origin: baseline,
240
+ iou: verdict.iou
241
+ });
242
+ });
243
+ for (const entry of dismissed) boxes.push({
244
+ ref: entry.ref,
245
+ status: "removed",
246
+ approximate: false,
247
+ origin: entry.snapshot
248
+ });
249
+ if (opts.inferRemoved === true) for (const origin of origins) {
250
+ if (claimedRefs.has(origin.ref)) continue;
251
+ boxes.push({
252
+ ref: origin.ref,
253
+ status: "removed",
254
+ approximate: true,
255
+ origin
256
+ });
257
+ }
258
+ return {
259
+ boxes,
260
+ approximate: boxes.some((b) => b.approximate)
261
+ };
262
+ }
263
+ /** Counts per status, plus the totals a list row shows. */
264
+ function summarizeReview(review) {
265
+ const counts = {
266
+ unchanged: 0,
267
+ adjusted: 0,
268
+ reclassified: 0,
269
+ added: 0,
270
+ removed: 0,
271
+ "model-error": 0
272
+ };
273
+ for (const box of review.boxes) counts[box.status] += 1;
274
+ return {
275
+ counts,
276
+ total: review.boxes.length,
277
+ changed: review.boxes.length - counts.unchanged,
278
+ approximate: review.approximate
279
+ };
280
+ }
281
+ /** The prefix of the error a stale `expectedRevision` save is refused with. */
282
+ var RETRAIN_REVISION_CONFLICT = "retrain-revision-conflict";
283
+ /** The message a refused save carries — `parseRetrainRevisionConflict` reads it back. */
284
+ function retrainRevisionConflictMessage(frameId, conflict) {
285
+ return `${RETRAIN_REVISION_CONFLICT}: frame ${frameId} moved on — it is at revision ${String(conflict.currentRevision)}, the save expected ${String(conflict.expectedRevision)} (current=${String(conflict.currentRevision)} expected=${String(conflict.expectedRevision)})`;
286
+ }
287
+ /** The conflict an error message names, or `null` when it is some other error. */
288
+ function parseRetrainRevisionConflict(message) {
289
+ if (!message.includes("retrain-revision-conflict")) return null;
290
+ const match = /current=(\d+) expected=(\d+)/.exec(message);
291
+ if (match?.[1] === void 0 || match[2] === void 0) return null;
292
+ return {
293
+ currentRevision: Number(match[1]),
294
+ expectedRevision: Number(match[2])
295
+ };
296
+ }
297
+ //#endregion
102
298
  //#region src/capabilities/schemas/streaming-shared.ts
103
299
  /** Shared Zod schemas used across streaming capabilities. */
104
300
  var CamProfileSchema = z.enum([
@@ -4734,7 +4930,14 @@ var TopologyNodeSchema = z.object({
4734
4930
  * completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
4735
4931
  * for offline rows and when the hub cannot tell.
4736
4932
  */
4737
- meshTransport: z.enum(["tls", "clear"]).optional()
4933
+ meshTransport: z.enum(["tls", "clear"]).optional(),
4934
+ /**
4935
+ * Whether the hub holds this online AGENT's capability registration (its
4936
+ * `registerNode` manifest). `false` = online in the mesh but not ready: the
4937
+ * hub dropped the registration on a disconnect only it saw and the agent has
4938
+ * not re-sent it. Absent for the hub and offline rows.
4939
+ */
4940
+ capabilitiesRegistered: z.boolean().optional()
4738
4941
  });
4739
4942
  var CapUsageEdgeSchema = z.object({
4740
4943
  callerAddonId: z.string(),
@@ -5762,6 +5965,7 @@ function createDeviceProxy(api, binding, opts) {
5762
5965
  proposeRetrainAnnotations: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "proposeRetrainAnnotations", "mutation", input),
5763
5966
  listRetrainAnnotations: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "listRetrainAnnotations", "query", input),
5764
5967
  saveRetrainAnnotations: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "saveRetrainAnnotations", "mutation", input),
5968
+ backfillRetrainOrigins: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "backfillRetrainOrigins", "mutation", input),
5765
5969
  completeRetrainTrack: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "completeRetrainTrack", "mutation", input),
5766
5970
  restageRetrainTrack: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "restageRetrainTrack", "mutation", input),
5767
5971
  getRetrainExportUrl: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getRetrainExportUrl", "query", input),
@@ -6045,6 +6249,8 @@ function createDeviceProxy(api, binding, opts) {
6045
6249
  getAudioAssignment: (input) => dispatchSystem("pipelineOrchestrator", "getAudioAssignment", "query", input),
6046
6250
  getCameraSettings: (input) => dispatchSystem("pipelineOrchestrator", "getCameraSettings", "query", input),
6047
6251
  setCameraStepToggle: (input) => dispatchSystem("pipelineOrchestrator", "setCameraStepToggle", "mutation", input),
6252
+ getCameraDetectionSource: (input) => dispatchSystem("pipelineOrchestrator", "getCameraDetectionSource", "query", input),
6253
+ setCameraDetectionSource: (input) => dispatchSystem("pipelineOrchestrator", "setCameraDetectionSource", "mutation", input),
6048
6254
  getCameraStepOverrides: (input) => dispatchSystem("pipelineOrchestrator", "getCameraStepOverrides", "query", input),
6049
6255
  setCameraStepOverride: (input) => dispatchSystem("pipelineOrchestrator", "setCameraStepOverride", "mutation", input),
6050
6256
  setCameraStepSettings: (input) => dispatchSystem("pipelineOrchestrator", "setCameraStepSettings", "mutation", input),
@@ -7567,6 +7773,7 @@ function createSystemProxy(api) {
7567
7773
  upsert: (input) => dispatch("settingsStore", "upsert", "mutation", input),
7568
7774
  insert: (input) => dispatch("settingsStore", "insert", "mutation", input),
7569
7775
  insertMany: (input) => dispatch("settingsStore", "insertMany", "mutation", input),
7776
+ transact: (input) => dispatch("settingsStore", "transact", "mutation", input),
7570
7777
  update: (input) => dispatch("settingsStore", "update", "mutation", input),
7571
7778
  delete: (input) => dispatch("settingsStore", "delete", "mutation", input),
7572
7779
  deleteWhere: (input) => dispatch("settingsStore", "deleteWhere", "mutation", input),
@@ -7621,6 +7828,7 @@ function createSystemProxy(api) {
7621
7828
  getBrokerStats: (input) => dispatch("streamBroker", "getBrokerStats", "query", input),
7622
7829
  probeStream: (input) => dispatch("streamBroker", "probeStream", "mutation", input),
7623
7830
  listClients: (input) => dispatch("streamBroker", "listClients", "query", input),
7831
+ getLiveViewerCounts: (input) => dispatch("streamBroker", "getLiveViewerCounts", "query", input),
7624
7832
  killClient: (input) => dispatch("streamBroker", "killClient", "mutation", input),
7625
7833
  getStreamUrl: (input) => dispatch("streamBroker", "getStreamUrl", "query", input),
7626
7834
  getStreamWithCodec: (input) => dispatch("streamBroker", "getStreamWithCodec", "mutation", input),
@@ -10593,4 +10801,4 @@ var TimelapseRuleSchema = TimelapseRuleInputSchema.extend({
10593
10801
  updatedAt: z.number()
10594
10802
  });
10595
10803
  //#endregion
10596
- export { APPLE_SA_TO_MACRO, AUDIO_MACRO_LABELS, AlarmArmModeSchema, CLIP_BROKER_PACED_RATES, COCO_TO_MACRO, CamProfileSchema, DEFAULT_TIMELAPSE_PREVIEW_TEXT, DeviceType, EVENTFUL_CAP_NAMES, EVENT_KIND_BY_CAP, EVENT_TAXONOMY, MACRO_LABELS, NC_ALARM_DELAY_MAX_SEC, NC_ALARM_SENSORS_MAX, NC_ALARM_SYSTEM_EVENT_KINDS, NC_ALARM_TRIGGERED_MAX_SEC, NC_BATTERY_CONSUMABLE_SYSTEM_EVENT_KINDS, NC_CAMERA_SCOPE_CAP_NAME, NC_CONSUMABLE_LOW_PERCENT_DEFAULT, NC_CONSUMABLE_LOW_PERCENT_MAX, NC_GROUPING_DEFAULT_SEC, NC_GROUPING_MAX_SEC, NC_GROUPING_MIN_SEC, NC_RULE_EDITOR_SECTION_ORDER, NC_RULE_KIND_SPECS, NC_SENSOR_TRANSITION_UNSUPPORTED_REASON, NC_SYSTEM_EVENT_FAMILY_FILTERS, NC_SYSTEM_EVENT_KIND_GROUP_SPECS, NC_SYSTEM_EVENT_SUMMARY_FAMILIES, NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS, NC_TEMPLATE_VARS, NcAlarmConfigSchema, NcAlarmSensorsSchema, NcAlarmSettingsPatchSchema, NcHistoryEntrySchema, NcRuleLastRunsSchema, NodeDirectorySchema, RECORDING_EXPORT_MAX_READ_BYTES, SystemMirror, TIMELAPSE_DENSE_FLOOR_SEC, TimelapseRuleSchema, YAMNET_TO_MACRO, alarmDeviceBlocksArming, alarmDeviceSecureOnArm, alarmPatchLanded, conditionVisibleForKind, createSystemProxy, droppedConditionsForKind, isHeldBackTemplateVar, isSystemRuleKind, kindsForDiscriminator, knownValues, nodePickerItems, packagePickerItems, pickerForCondition, pickerForRuleClasses, resolveModeDelays, ruleDeviceCompatCapNames, ruleEditorSectionsForKind, ruleGroupingApplies, ruleKindOf, ruleKindSpec, ruleSeedForSection, sensorTransitionNeverFires, sensorTransitionOffered, stateLabel, systemEventDeliveryProblems, systemEventFilterAppliesToAnyKind, systemEventKindsOfFamily, systemFamilyOfKind, templateCarriesSummary, templateVarDeliveryApplies, templateVarKindApplies, templateVarSystemEventApplies };
10804
+ export { APPLE_SA_TO_MACRO, AUDIO_MACRO_LABELS, AlarmArmModeSchema, CLIP_BROKER_PACED_RATES, COCO_TO_MACRO, CamProfileSchema, DEFAULT_TIMELAPSE_PREVIEW_TEXT, DeviceType, EVENTFUL_CAP_NAMES, EVENT_KIND_BY_CAP, EVENT_TAXONOMY, MACRO_LABELS, NC_ALARM_DELAY_MAX_SEC, NC_ALARM_SENSORS_MAX, NC_ALARM_SYSTEM_EVENT_KINDS, NC_ALARM_TRIGGERED_MAX_SEC, NC_BATTERY_CONSUMABLE_SYSTEM_EVENT_KINDS, NC_CAMERA_SCOPE_CAP_NAME, NC_CONSUMABLE_LOW_PERCENT_DEFAULT, NC_CONSUMABLE_LOW_PERCENT_MAX, NC_GROUPING_DEFAULT_SEC, NC_GROUPING_MAX_SEC, NC_GROUPING_MIN_SEC, NC_RULE_EDITOR_SECTION_ORDER, NC_RULE_KIND_SPECS, NC_SENSOR_TRANSITION_UNSUPPORTED_REASON, NC_SYSTEM_EVENT_FAMILY_FILTERS, NC_SYSTEM_EVENT_KIND_GROUP_SPECS, NC_SYSTEM_EVENT_SUMMARY_FAMILIES, NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS, NC_TEMPLATE_VARS, NcAlarmConfigSchema, NcAlarmSensorsSchema, NcAlarmSettingsPatchSchema, NcHistoryEntrySchema, NcRuleLastRunsSchema, NodeDirectorySchema, RECORDING_EXPORT_MAX_READ_BYTES, RETRAIN_REVIEW_ADJUSTED_IOU, RETRAIN_REVIEW_MATCH_IOU, RETRAIN_REVIEW_STATUSES, RETRAIN_REVISION_CONFLICT, SystemMirror, TIMELAPSE_DENSE_FLOOR_SEC, TimelapseRuleSchema, YAMNET_TO_MACRO, alarmDeviceBlocksArming, alarmDeviceSecureOnArm, alarmPatchLanded, classifyRetrainReview, conditionVisibleForKind, createSystemProxy, droppedConditionsForKind, isHeldBackTemplateVar, isSystemRuleKind, kindsForDiscriminator, knownValues, nodePickerItems, packagePickerItems, parseRetrainRevisionConflict, pickerForCondition, pickerForRuleClasses, resolveModeDelays, retrainBoxIou, retrainRevisionConflictMessage, ruleDeviceCompatCapNames, ruleEditorSectionsForKind, ruleGroupingApplies, ruleKindOf, ruleKindSpec, ruleSeedForSection, sensorTransitionNeverFires, sensorTransitionOffered, stateLabel, summarizeReview, systemEventDeliveryProblems, systemEventFilterAppliesToAnyKind, systemEventKindsOfFamily, systemFamilyOfKind, templateCarriesSummary, templateVarDeliveryApplies, templateVarKindApplies, templateVarSystemEventApplies };
@@ -1885,6 +1885,13 @@ export type AppRouter = TrpcCoreRouter<{
1885
1885
  output: z.infer<typeof dataStoreProviderCapability.methods.insertMany.output>;
1886
1886
  meta: object;
1887
1887
  }>;
1888
+ transact: TRPCMutationProcedure<{
1889
+ input: {
1890
+ [x: string]: unknown;
1891
+ } & z.input<typeof dataStoreProviderCapability.methods.transact.input>;
1892
+ output: z.infer<typeof dataStoreProviderCapability.methods.transact.output>;
1893
+ meta: object;
1894
+ }>;
1888
1895
  update: TRPCMutationProcedure<{
1889
1896
  input: {
1890
1897
  [x: string]: unknown;
@@ -6136,6 +6143,13 @@ export type AppRouter = TrpcCoreRouter<{
6136
6143
  output: z.infer<typeof pipelineAnalyticsCapability.methods.saveRetrainAnnotations.output>;
6137
6144
  meta: object;
6138
6145
  }>;
6146
+ backfillRetrainOrigins: TRPCMutationProcedure<{
6147
+ input: {
6148
+ [x: string]: unknown;
6149
+ } & z.input<typeof pipelineAnalyticsCapability.methods.backfillRetrainOrigins.input>;
6150
+ output: z.infer<typeof pipelineAnalyticsCapability.methods.backfillRetrainOrigins.output>;
6151
+ meta: object;
6152
+ }>;
6139
6153
  completeRetrainTrack: TRPCMutationProcedure<{
6140
6154
  input: {
6141
6155
  [x: string]: unknown;
@@ -6934,6 +6948,20 @@ export type AppRouter = TrpcCoreRouter<{
6934
6948
  output: z.infer<typeof pipelineOrchestratorCapability.methods.setCameraStepToggle.output>;
6935
6949
  meta: object;
6936
6950
  }>;
6951
+ getCameraDetectionSource: TRPCQueryProcedure<{
6952
+ input: {
6953
+ [x: string]: unknown;
6954
+ } & z.input<typeof pipelineOrchestratorCapability.methods.getCameraDetectionSource.input>;
6955
+ output: z.infer<typeof pipelineOrchestratorCapability.methods.getCameraDetectionSource.output>;
6956
+ meta: object;
6957
+ }>;
6958
+ setCameraDetectionSource: TRPCMutationProcedure<{
6959
+ input: {
6960
+ [x: string]: unknown;
6961
+ } & z.input<typeof pipelineOrchestratorCapability.methods.setCameraDetectionSource.input>;
6962
+ output: z.infer<typeof pipelineOrchestratorCapability.methods.setCameraDetectionSource.output>;
6963
+ meta: object;
6964
+ }>;
6937
6965
  getCameraStepOverrides: TRPCQueryProcedure<{
6938
6966
  input: {
6939
6967
  [x: string]: unknown;
@@ -8139,6 +8167,13 @@ export type AppRouter = TrpcCoreRouter<{
8139
8167
  output: z.infer<typeof settingsStoreCapability.methods.insertMany.output>;
8140
8168
  meta: object;
8141
8169
  }>;
8170
+ transact: TRPCMutationProcedure<{
8171
+ input: {
8172
+ [x: string]: unknown;
8173
+ } & z.input<typeof settingsStoreCapability.methods.transact.input>;
8174
+ output: z.infer<typeof settingsStoreCapability.methods.transact.output>;
8175
+ meta: object;
8176
+ }>;
8142
8177
  update: TRPCMutationProcedure<{
8143
8178
  input: {
8144
8179
  [x: string]: unknown;
@@ -8863,6 +8898,13 @@ export type AppRouter = TrpcCoreRouter<{
8863
8898
  output: z.infer<typeof streamBrokerCapability.methods.listClients.output>;
8864
8899
  meta: object;
8865
8900
  }>;
8901
+ getLiveViewerCounts: TRPCQueryProcedure<{
8902
+ input: {
8903
+ nodeId?: string | undefined;
8904
+ } | undefined;
8905
+ output: z.infer<typeof streamBrokerCapability.methods.getLiveViewerCounts.output>;
8906
+ meta: object;
8907
+ }>;
8866
8908
  killClient: TRPCMutationProcedure<{
8867
8909
  input: {
8868
8910
  [x: string]: unknown;
@@ -300,7 +300,7 @@ export interface DeviceProxy {
300
300
  readonly notificationRules: Pick<InferDeviceProxyCap<typeof notificationRulesCapability>, 'setDeviceMuted'>;
301
301
  readonly osdManager: Pick<InferDeviceProxyCap<typeof osdManagerCapability>, 'getDeviceOsd' | 'getSourceCatalog' | 'setSlotBinding' | 'clearSlotBinding' | 'setSlotCameraEnabled' | 'previewSlot' | 'renderDevice'>;
302
302
  readonly pipelineExecutor: Pick<InferDeviceProxyCap<typeof pipelineExecutorCapability>, 'runPipeline' | 'runPipelineBatch'>;
303
- readonly pipelineOrchestrator: Pick<InferDeviceProxyCap<typeof pipelineOrchestratorCapability>, 'assignPipeline' | 'unassignPipeline' | 'setPipelineDevicePin' | 'getPipelineDevicePin' | 'getPipelineAssignment' | 'getCameraMetrics' | 'assignAudio' | 'unassignAudio' | 'getAudioAssignment' | 'getCameraSettings' | 'setCameraStepToggle' | 'getCameraStepOverrides' | 'setCameraStepOverride' | 'setCameraStepSettings' | 'setCameraPipelineForAgent' | 'resolvePipeline' | 'getCameraSwitches' | 'setCameraSwitch' | 'getCameraStatus' | 'getDeviceSettingsContribution' | 'getDeviceLiveContribution' | 'applyDeviceSettingsPatch'>;
303
+ readonly pipelineOrchestrator: Pick<InferDeviceProxyCap<typeof pipelineOrchestratorCapability>, 'assignPipeline' | 'unassignPipeline' | 'setPipelineDevicePin' | 'getPipelineDevicePin' | 'getPipelineAssignment' | 'getCameraMetrics' | 'assignAudio' | 'unassignAudio' | 'getAudioAssignment' | 'getCameraSettings' | 'setCameraStepToggle' | 'getCameraDetectionSource' | 'setCameraDetectionSource' | 'getCameraStepOverrides' | 'setCameraStepOverride' | 'setCameraStepSettings' | 'setCameraPipelineForAgent' | 'resolvePipeline' | 'getCameraSwitches' | 'setCameraSwitch' | 'getCameraStatus' | 'getDeviceSettingsContribution' | 'getDeviceLiveContribution' | 'applyDeviceSettingsPatch'>;
304
304
  readonly pipelineRunner: Pick<InferDeviceProxyCap<typeof pipelineRunnerCapability>, 'detachCamera' | 'getCameraMetrics' | 'requestOccupancyBurst' | 'runDetailSubtree' | 'parkTrackFrame' | 'getParkedTrackFrame' | 'releaseParkedTrackFrames'>;
305
305
  readonly plateGallery: Pick<InferDeviceProxyCap<typeof plateGalleryCapability>, 'listPlates' | 'getPlateByTrack'>;
306
306
  readonly recordingArchive: Pick<InferDeviceProxyCap<typeof recordingArchiveCapability>, 'getDeviceConfig' | 'locateSegment' | 'readSegmentBytes' | 'readGopBytes' | 'readWindowBytes' | 'setDeviceConfig' | 'rescanStorage' | 'pruneFootage' | 'deleteFootprint' | 'renderGif' | 'renderClip' | 'getStatus' | 'getDeviceSettingsContribution' | 'getDeviceLiveContribution' | 'applyDeviceSettingsPatch'>;
@@ -6,7 +6,7 @@
6
6
  * scope+access check inside `protectedProcedure` (see
7
7
  * `server/backend/src/api/trpc/trpc.middleware.ts`).
8
8
  *
9
- * Coverage: 1297 method paths across 170 capabilities.
9
+ * Coverage: 1303 method paths across 170 capabilities.
10
10
  */
11
11
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
12
12
  export interface MethodAccessRecord {
@@ -6,8 +6,8 @@
6
6
  * system-scope cap that takes a deviceId was previously never device-filtered
7
7
  * — see the generator header).
8
8
  *
9
- * Coverage: 517 methods carry a device reference, of which
10
- * 163 are on SYSTEM-scope caps.
9
+ * Coverage: 520 methods carry a device reference, of which
10
+ * 165 are on SYSTEM-scope caps.
11
11
  *
12
12
  * Top-level fields, number arrays, and one-level arrays of objects carrying
13
13
  * a numeric device field (targets[].deviceId) are all mapped; the matcher
@@ -99,10 +99,10 @@ export interface SystemProxy {
99
99
  readonly recordingArchive: Pick<InferProvider<typeof recordingArchiveCapability>, 'getAvailabilityBatch' | 'getDaysWithRecordingsBatch' | 'getStorageUsage' | 'listOpsLog' | 'pauseForStorageMigration' | 'resumeForStorageMigration' | 'refreshStorageLocationsForMigration' | 'startStorageMigrationMove' | 'getStorageMigrationMoveStatus' | 'cancelStorageMigrationMove' | 'relocateFootage' | 'listRelocateJobs' | 'getRelocateResidue' | 'reconcileLedgerAgainstDisk' | 'cancelRelocateJob' | 'planStorageRebalance' | 'startStorageRebalance' | 'getPlacement' | 'setDevicePlacement'>;
100
100
  readonly recordingExport: Pick<InferProvider<typeof recordingExportCapability>, 'createExport' | 'getExport' | 'cancelExport' | 'deleteExport' | 'getDownloadUrl' | 'readExportBytes'>;
101
101
  readonly serverManagement: Pick<InferProvider<typeof serverManagementCapability>, 'getServerPackageStatus' | 'checkServerUpdate' | 'applyServerUpdate' | 'rollbackServerUpdate' | 'restartServer'>;
102
- readonly settingsStore: Pick<InferProvider<typeof settingsStoreCapability>, 'get' | 'set' | 'query' | 'upsert' | 'insert' | 'insertMany' | 'update' | 'delete' | 'deleteWhere' | 'updateWhere' | 'count' | 'aggregate' | 'histogram' | 'isEmpty' | 'declareCollection'>;
102
+ readonly settingsStore: Pick<InferProvider<typeof settingsStoreCapability>, 'get' | 'set' | 'query' | 'upsert' | 'insert' | 'insertMany' | 'transact' | 'update' | 'delete' | 'deleteWhere' | 'updateWhere' | 'count' | 'aggregate' | 'histogram' | 'isEmpty' | 'declareCollection'>;
103
103
  readonly storage: Pick<InferProvider<typeof storageCapability>, 'resolve' | 'write' | 'read' | 'exists' | 'list' | 'delete' | 'getAvailableSpace' | 'beginUpload' | 'writeChunk' | 'finalizeUpload' | 'abortUpload' | 'beginDownload' | 'readChunk' | 'endDownload' | 'listLocations' | 'listLocationDeclarations' | 'upsertLocation' | 'deleteLocation' | 'listDrainProgress' | 'testLocation' | 'listProviders' | 'testConfig'>;
104
104
  readonly storageMigration: Pick<InferProvider<typeof storageMigrationCapability>, 'plan' | 'start' | 'status' | 'cancel' | 'movers' | 'residue' | 'drain' | 'cleanupStart' | 'cleanupStatus' | 'cleanupCancel' | 'history'>;
105
- readonly streamBroker: Pick<InferProvider<typeof streamBrokerCapability>, 'fetchEventMedia' | 'listAllCameraStreams' | 'listAllProfileSlots' | 'getBrokerStats' | 'probeStream' | 'listClients' | 'killClient' | 'getStreamUrl' | 'getStreamWithCodec' | 'releaseStreamWithCodec' | 'acquireEgressTranscode' | 'releaseEgressTranscode' | 'subscribeAudioChunks' | 'pullAudioChunks' | 'unsubscribeAudioChunks' | 'setPreBufferDuration' | 'getPreBufferInfo' | 'getRtspPort' | 'getAllRtspEntries' | 'getRtspEntry' | 'regenerateRtspToken' | 'setRtspEnabled' | 'isRtspEnabled'>;
105
+ readonly streamBroker: Pick<InferProvider<typeof streamBrokerCapability>, 'fetchEventMedia' | 'listAllCameraStreams' | 'listAllProfileSlots' | 'getBrokerStats' | 'probeStream' | 'listClients' | 'getLiveViewerCounts' | 'killClient' | 'getStreamUrl' | 'getStreamWithCodec' | 'releaseStreamWithCodec' | 'acquireEgressTranscode' | 'releaseEgressTranscode' | 'subscribeAudioChunks' | 'pullAudioChunks' | 'unsubscribeAudioChunks' | 'setPreBufferDuration' | 'getPreBufferInfo' | 'getRtspPort' | 'getAllRtspEntries' | 'getRtspEntry' | 'regenerateRtspToken' | 'setRtspEnabled' | 'isRtspEnabled'>;
106
106
  readonly system: Pick<InferProvider<typeof systemCapability>, 'info' | 'health' | 'featureFlags' | 'networkAddresses' | 'getRetentionConfig' | 'setRetentionConfig' | 'forceRetentionCleanup' | 'getSiteLocation' | 'setSiteLocation' | 'detectSiteLocation' | 'getRequestCensus' | 'getLoadContributions' | 'getFailureContributions' | 'getLoggingSettings' | 'setLoggingSettings'>;
107
107
  readonly terminalSession: Pick<InferProvider<typeof terminalSessionCapability>, 'listProfiles' | 'listInstances' | 'createInstance' | 'updateInstance' | 'deleteInstance' | 'setInstanceEnabled' | 'listLegacyCameras' | 'adoptLegacyMonitor' | 'listSessions' | 'openSession' | 'resize' | 'pullOutput' | 'writeInput' | 'close'>;
108
108
  readonly toast: Pick<InferProvider<typeof toastCapability>, 'onToast'>;
package/dist/index.d.ts CHANGED
@@ -51,6 +51,7 @@ export { collectHydratedFieldEntries, collectHydratedFieldValues, hydrateSchema,
51
51
  export { collectKeychainStoredKeys, collectSecretConfigKeys, isKeychainStoredField, isSecretConfigField, REDACTED_SECRET, schemaDeclaresAnyField, } from './interfaces/config-ui-secrets.js';
52
52
  export * from './keychain/index.js';
53
53
  export * from './training/index.js';
54
+ export * from './retrain-review.js';
54
55
  export { mergeSecretStatePaths, parseSecretStatePath, type SecretNode, type SecretTree, secretTreeFromPaths, secretTreeFromSchema, } from './addon/secret-paths.js';
55
56
  export { collectSecretMarkerRefs, KeychainWriteRefusedError, type ResolvedSecrets, resolveSecretMarkers, type SecretWriteInput, type SecretWriteResult, transformSecretWrite, type UnresolvedReason, type UnresolvedSecret, } from './addon/secret-settings-view.js';
56
57
  export type * from './interfaces/context.js';