@camstack/addon-static-turn 1.2.25 → 1.2.27

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.
@@ -5800,6 +5800,13 @@ var BaseAddon = class {
5800
5800
  _readinessGeneration = typeof crypto !== "undefined" && crypto.randomUUID ? crypto.randomUUID() : Math.random().toString(36).slice(2, 14);
5801
5801
  /** Capability names this addon registered at init — used to emit matching `down` events on shutdown. */
5802
5802
  _registeredCapNames = [];
5803
+ /**
5804
+ * True only after `readAddonStore` actually answered. Constructor
5805
+ * defaults look like stored config when the store is down — a forked
5806
+ * addon that auto-starts from those defaults (cloudflare-tunnel quick
5807
+ * mode, 2026-08-25) is not "the operator chose this".
5808
+ */
5809
+ settingsStoreReady = false;
5803
5810
  /** Default config values. Provided via constructor. */
5804
5811
  defaults;
5805
5812
  constructor(defaults) {
@@ -6200,7 +6207,9 @@ var BaseAddon = class {
6200
6207
  ];
6201
6208
  let lastErr;
6202
6209
  for (let attempt = 0; attempt <= delaysMs.length; attempt++) try {
6203
- return await settings.readAddonStore() ?? {};
6210
+ const stored = await settings.readAddonStore() ?? {};
6211
+ this.settingsStoreReady = true;
6212
+ return stored;
6204
6213
  } catch (err) {
6205
6214
  lastErr = err;
6206
6215
  const msg = err instanceof Error ? err.message : String(err);
@@ -6208,6 +6217,7 @@ var BaseAddon = class {
6208
6217
  if (attempt === delaysMs.length) break;
6209
6218
  await new Promise((r) => setTimeout(r, delaysMs[attempt]));
6210
6219
  }
6220
+ this.settingsStoreReady = false;
6211
6221
  this._ctx?.logger?.warn?.("readAddonStore: settings-store unavailable after retries — using defaults", { meta: { error: lastErr instanceof Error ? lastErr.message : String(lastErr) } });
6212
6222
  return {};
6213
6223
  }
@@ -8003,6 +8013,15 @@ var LabelDefinitionSchema = object({
8003
8013
  description: string().optional(),
8004
8014
  icon: string().optional()
8005
8015
  });
8016
+ var ClassMapDefinitionSchema = object({
8017
+ mapping: record(string(), _enum([
8018
+ "person",
8019
+ "vehicle",
8020
+ "animal",
8021
+ "package"
8022
+ ])),
8023
+ preserveOriginal: boolean()
8024
+ });
8006
8025
  var MODEL_FORMATS = [
8007
8026
  "onnx",
8008
8027
  "coreml",
@@ -8086,6 +8105,12 @@ var ModelVariantGroupSchema = object({
8086
8105
  */
8087
8106
  resolution: number().int().positive().optional()
8088
8107
  });
8108
+ var ModelProviderIdSchema = _enum([
8109
+ "camstack",
8110
+ "frigate",
8111
+ "scrypted",
8112
+ "custom"
8113
+ ]);
8089
8114
  var ModelCatalogEntrySchema = object({
8090
8115
  id: string(),
8091
8116
  name: string(),
@@ -8181,7 +8206,19 @@ var ModelCatalogEntrySchema = object({
8181
8206
  * `id` stays the source of truth for resolution/download/persistence; grouping
8182
8207
  * is a presentation overlay resolved back to an `id`.
8183
8208
  */
8184
- group: ModelVariantGroupSchema.optional()
8209
+ group: ModelVariantGroupSchema.optional(),
8210
+ /**
8211
+ * Catalog source for the pipeline stepper's provider-first picker. Absent on
8212
+ * built-in CamStack entries (treated as `camstack`) and on registry rows
8213
+ * persisted before this field existed (`inferModelProvider` fills those).
8214
+ */
8215
+ provider: ModelProviderIdSchema.optional(),
8216
+ /**
8217
+ * Per-MODEL class map override. Absent ⇒ the step's `StepDefinition.classMap`
8218
+ * applies (Frigate / COCO public catalog). Set on a custom model whose raw
8219
+ * labels already ARE the CamStack macros (Scrypted identity map).
8220
+ */
8221
+ classMap: ClassMapDefinitionSchema.optional()
8185
8222
  });
8186
8223
  var ConvertTargetSchema = discriminatedUnion("format", [object({
8187
8224
  format: literal("openvino"),
@@ -8210,7 +8247,8 @@ var ModelConvertMetadataSchema = object({
8210
8247
  "ocr",
8211
8248
  "segmentation"
8212
8249
  ]),
8213
- faceAlignment: boolean().optional()
8250
+ faceAlignment: boolean().optional(),
8251
+ classMap: ClassMapDefinitionSchema.optional()
8214
8252
  });
8215
8253
  var ConvertResultSchema = object({
8216
8254
  entry: ModelCatalogEntrySchema,
@@ -11703,6 +11741,27 @@ var LinkedDeviceSchema = object({
11703
11741
  features: array(string()),
11704
11742
  producesTrackedEvents: boolean().optional()
11705
11743
  });
11744
+ /** One camera's resolved linked set, tagged with the camera it belongs to.
11745
+ * The batch answer needs the tag; the single-device answer already has it
11746
+ * from the input, which is why `getLinkedDevices` keeps the untagged shape. */
11747
+ var LinkedDevicesForDeviceSchema = object({
11748
+ deviceId: number(),
11749
+ mode: LinkedDevicesModeSchema,
11750
+ devices: array(LinkedDeviceSchema)
11751
+ });
11752
+ /** One device's binding map — the shape `getBindings`, `getBindingsBatch` and
11753
+ * `getAllBindings` all answer in. Declared once: three copies of the same
11754
+ * object literal is exactly how the three drift apart. */
11755
+ var DeviceBindingsForDeviceSchema = object({
11756
+ deviceId: number(),
11757
+ entries: array(object({
11758
+ capName: string(),
11759
+ kind: _enum(["native", "wrapped"]),
11760
+ providerAddonId: string(),
11761
+ providerNodeId: string(),
11762
+ nativeAddonId: string()
11763
+ }))
11764
+ });
11706
11765
  var SavedDeviceRowSchema = object({
11707
11766
  /** Numeric id reserved at allocateDeviceId time. */
11708
11767
  id: number(),
@@ -11928,11 +11987,25 @@ method(object({
11928
11987
  projection: _enum(["full", "slim"]).optional(),
11929
11988
  /** Return only camera devices. Filtering server-side instead of
11930
11989
  * shipping 293 rows to find 12. */
11931
- isCamera: boolean().optional()
11990
+ isCamera: boolean().optional(),
11991
+ /**
11992
+ * Return only these device ids. For the caller that already KNOWS the
11993
+ * handful it wants and needs a field the id-bearing answer does not
11994
+ * carry — the viewer's linked-devices panel joins `type` and `online`
11995
+ * onto ~8 linked ids and, unfiltered, dragged the fleet across to do
11996
+ * it: 433 KB slim / 958 KB full for 967 devices, on a query that
11997
+ * refetches on the reconcile interval, on a phone.
11998
+ *
11999
+ * Safe to send at a hub that predates it: Zod STRIPS unknown input
12000
+ * keys rather than rejecting them (verified against the live hub
12001
+ * 2026-08-25 — 967 rows came back), so an old hub answers exactly what
12002
+ * it answers today and the caller filters as it already does.
12003
+ */
12004
+ deviceIds: array(number()).optional()
11932
12005
  }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
11933
12006
  mode: LinkedDevicesModeSchema,
11934
12007
  devices: array(LinkedDeviceSchema)
11935
- })), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
12008
+ })), method(object({ deviceIds: array(number()) }), array(LinkedDevicesForDeviceSchema)), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
11936
12009
  deviceId: number(),
11937
12010
  values: record(string(), unknown())
11938
12011
  }), object({ success: literal(true) }), {
@@ -11959,25 +12032,7 @@ method(object({
11959
12032
  }), method(object({ deviceId: number() }), array(StreamProbeResultSchema), {
11960
12033
  kind: "mutation",
11961
12034
  auth: "admin"
11962
- }), method(object({ deviceId: number() }), object({
11963
- deviceId: number(),
11964
- entries: array(object({
11965
- capName: string(),
11966
- kind: _enum(["native", "wrapped"]),
11967
- providerAddonId: string(),
11968
- providerNodeId: string(),
11969
- nativeAddonId: string()
11970
- }))
11971
- })), method(object({}), array(object({
11972
- deviceId: number(),
11973
- entries: array(object({
11974
- capName: string(),
11975
- kind: _enum(["native", "wrapped"]),
11976
- providerAddonId: string(),
11977
- providerNodeId: string(),
11978
- nativeAddonId: string()
11979
- }))
11980
- }))), method(object({
12035
+ }), method(object({ deviceId: number() }), DeviceBindingsForDeviceSchema), method(object({ deviceIds: array(number()) }), array(DeviceBindingsForDeviceSchema)), method(object({}), array(DeviceBindingsForDeviceSchema)), method(object({
11981
12036
  deviceId: number(),
11982
12037
  capName: string(),
11983
12038
  wrapperAddonId: string(),
@@ -14349,12 +14404,15 @@ var NcOccupancyConditionSchema = object({
14349
14404
  * there is no second switch that can disagree with the first and every rule
14350
14405
  * authored before the decision migrates for free (`audioModeOf`):
14351
14406
  *
14352
- * - **LABEL mode — `labels` present.** The rule fires on the FIRST frame the
14353
- * classifier labels with one of them. No window, no percentage:
14354
- * `hitPercent` and `samplingSeconds` are ignored, and the rule's own
14355
- * `throttle` cooldown is the only brake. The per-label confidence floor is
14356
- * the analyzer's (`classificationMinScore`, per device) a label only
14357
- * reaches this condition if the classifier was already confident enough.
14407
+ * - **LABEL mode — `labels` present.** The rule fires when `confirmHits`
14408
+ * labelled frames land inside `confirmWindowSec` (default 2 in 5 s).
14409
+ * `hitPercent` and `samplingSeconds` are still ignored a percentage of
14410
+ * frames is the wrong question for a classifier that labels 1–3 frames
14411
+ * per episode. The count window is the brake that drops a single-frame
14412
+ * false positive; the rule's own `throttle` cooldown is the other. The
14413
+ * per-label confidence floor is the analyzer's (`classificationMinScore`,
14414
+ * per device) — a label only reaches this condition if the classifier was
14415
+ * already confident enough. `confirmHits: 1` restores first-frame fire.
14358
14416
  * - **LEVEL mode — `dbThreshold` present, no labels.** The sampling window IS
14359
14417
  * the condition: at least `hitPercent`% of the samples over
14360
14418
  * `samplingSeconds` must be at or above `dbThreshold` dBFS (see
@@ -14381,14 +14439,22 @@ var NcOccupancyConditionSchema = object({
14381
14439
  * an operator who typed `dog` mean the same thing.
14382
14440
  */
14383
14441
  var NcAudioConditionSchema = object({
14384
- /** LABEL MODE: audio macro labels. Present ⇒ fires on the first labelled frame. */
14442
+ /** LABEL MODE: audio macro labels. Present ⇒ count-in-window confirm. */
14385
14443
  labels: array(string().min(1)).min(1).optional(),
14386
14444
  /** LEVEL MODE: floor in dBFS (negative-going, `0` = full scale). */
14387
14445
  dbThreshold: number().min(-96).max(0).optional(),
14388
14446
  /** LEVEL MODE ONLY: percentage of the window's samples that must be hits (1–100). */
14389
14447
  hitPercent: number().int().min(1).max(100).default(60),
14390
14448
  /** LEVEL MODE ONLY: length of the sampling window in seconds. */
14391
- samplingSeconds: number().int().min(1).max(300).default(10)
14449
+ samplingSeconds: number().int().min(1).max(300).default(10),
14450
+ /**
14451
+ * LABEL MODE: how many labelled frames must land inside
14452
+ * {@link NcAudioConditionSchema.shape.confirmWindowSec} before dispatch.
14453
+ * Absent ⇒ 2 (the matcher default). `1` is first-frame fire.
14454
+ */
14455
+ confirmHits: number().int().min(1).max(20).optional(),
14456
+ /** LABEL MODE: the window those frames must share, in seconds. Absent ⇒ 5. */
14457
+ confirmWindowSec: number().int().min(1).max(60).optional()
14392
14458
  });
14393
14459
  /**
14394
14460
  * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
@@ -16762,6 +16828,46 @@ var RecentTracksPageSchema = object({
16762
16828
  /** Cursor for the next page, or null when this page is the last. */
16763
16829
  nextCursor: string().nullable()
16764
16830
  });
16831
+ var LIST_GROUPS_DEFAULT_LIMIT = 40;
16832
+ var LIST_GROUPS_MAX_LIMIT = 100;
16833
+ var AnalyticsGroupRecordSchema = object({
16834
+ id: string(),
16835
+ deviceId: number().int(),
16836
+ openedAt: number().int(),
16837
+ closedAt: number().int(),
16838
+ timestamp: number().int(),
16839
+ memberCount: number().int(),
16840
+ memberTrackIds: array(string()).readonly(),
16841
+ className: string(),
16842
+ classes: array(string()).readonly(),
16843
+ /** Relative event-media path, or null when the group has no picture yet. */
16844
+ mediaUrl: string().nullable(),
16845
+ singleton: boolean()
16846
+ });
16847
+ var AnalyticsGroupMemberSchema = object({
16848
+ trackId: string(),
16849
+ deviceId: number().int(),
16850
+ className: string(),
16851
+ firstSeen: number().int(),
16852
+ lastSeen: number().int(),
16853
+ mediaUrl: string().nullable()
16854
+ });
16855
+ var AnalyticsGroupDetailSchema = AnalyticsGroupRecordSchema.extend({ members: array(AnalyticsGroupMemberSchema).readonly() });
16856
+ var ListGroupsQueryInput = object({
16857
+ /** Devices to merge. An empty array yields `{ groups: [], nextCursor: null }`. */
16858
+ deviceIds: array(number()),
16859
+ /** Window lower bound on `closedAt` (inclusive). */
16860
+ since: number().optional(),
16861
+ /** Window upper bound on `openedAt` (inclusive). */
16862
+ until: number().optional(),
16863
+ limit: number().int().min(1).max(LIST_GROUPS_MAX_LIMIT).default(LIST_GROUPS_DEFAULT_LIMIT),
16864
+ /** Opaque continuation cursor from a previous page's `nextCursor`. */
16865
+ cursor: string().optional()
16866
+ });
16867
+ var ListGroupsPageSchema = object({
16868
+ groups: array(AnalyticsGroupRecordSchema).readonly(),
16869
+ nextCursor: string().nullable()
16870
+ });
16765
16871
  var KeyEventQueryInput = object({
16766
16872
  deviceId: number(),
16767
16873
  /** Window lower bound (track firstSeen ≥ since). */
@@ -16837,7 +16943,9 @@ var TrackCascadeCountsSchema = object({
16837
16943
  /** Unassigned plate reads removed (best-effort; plate leg deferred to plate-intelligence). */
16838
16944
  plates: number().int(),
16839
16945
  /** Per-track CLIP search vectors removed (best-effort). */
16840
- embeddings: number().int()
16946
+ embeddings: number().int(),
16947
+ /** Group membership + group rows removed with their last member (best-effort). */
16948
+ groups: number().int()
16841
16949
  });
16842
16950
  /** Disk-wins reconcile: media rows whose blobs are gone, then empty tracks. */
16843
16951
  var DiskReconcileCountsSchema = object({
@@ -16983,7 +17091,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16983
17091
  * stationary registry). Default false: the timeline lists passages,
16984
17092
  * not parking records (operator decision, 2026-08-15). */
16985
17093
  includeStationary: boolean().optional()
16986
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
17094
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(ListGroupsQueryInput, ListGroupsPageSchema), method(object({
17095
+ deviceId: number(),
17096
+ groupId: string().min(1)
17097
+ }), AnalyticsGroupDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
16987
17098
  kind: "mutation",
16988
17099
  auth: "admin"
16989
17100
  }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(EventKindsForDeviceSchema).readonly()), method(object({
@@ -17201,6 +17312,33 @@ var NativeCropRefSchema = object({
17201
17312
  h: number()
17202
17313
  })
17203
17314
  });
17315
+ object({
17316
+ crop: object({
17317
+ left: number(),
17318
+ top: number(),
17319
+ width: number().positive(),
17320
+ height: number().positive()
17321
+ }).optional(),
17322
+ content: object({
17323
+ width: number().int().positive(),
17324
+ height: number().int().positive()
17325
+ }),
17326
+ fit: _enum(["stretch", "contain"]),
17327
+ format: _enum([
17328
+ "rgb",
17329
+ "gray",
17330
+ "jpeg"
17331
+ ])
17332
+ });
17333
+ var FrameRefSchema = object({
17334
+ registryId: string().min(1),
17335
+ id: string().min(1),
17336
+ width: number().int().positive(),
17337
+ height: number().int().positive(),
17338
+ format: _enum(["rgb", "gray"]),
17339
+ timestamp: number(),
17340
+ capturedAt: number().optional()
17341
+ });
17204
17342
  var ModelFormatSchema$1 = _enum([
17205
17343
  "onnx",
17206
17344
  "coreml",
@@ -17266,7 +17404,8 @@ var PipelineModelOptionSchema = object({
17266
17404
  sizeMB: number()
17267
17405
  })),
17268
17406
  group: ModelVariantGroupSchema.optional(),
17269
- legacy: boolean().optional()
17407
+ legacy: boolean().optional(),
17408
+ provider: ModelProviderIdSchema.optional()
17270
17409
  });
17271
17410
  var ConfigFieldBridge = custom();
17272
17411
  var PipelineAddonSchemaSchema = object({
@@ -17445,6 +17584,12 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
17445
17584
  steps: array(PipelineStepInputSchema).min(1),
17446
17585
  frame: FrameInputSchema.optional(),
17447
17586
  /**
17587
+ * Process-local lazy frame. Valid only when caller and provider resolve
17588
+ * in the same execution-group process; split/cross-node callers use
17589
+ * `frame`/`image` inline compatibility instead.
17590
+ */
17591
+ frameRef: FrameRefSchema.optional(),
17592
+ /**
17448
17593
  * CB5 shm passthrough — a `FrameHandle` naming the same ring slot
17449
17594
  * the decoded pixels live in. One more member of the one-of
17450
17595
  * frame/frameHandle/image/imageBase64/referenceImage group.
@@ -17700,7 +17845,10 @@ var NativeCropResultSchema = object({
17700
17845
  * Which source served this crop, so a quality-sensitive consumer (the native
17701
17846
  * `keyFrame`) can reject a degraded fallback:
17702
17847
  * - `native` — cut from the decode worker's retained NATIVE surface (the
17703
- * quality path).
17848
+ * quality path). A subject-tile serve is also native-resolution and stays
17849
+ * `native` here: the public enum cannot name `tile` without a breaking cap
17850
+ * change. Runner telemetry distinguishes lease vs tile via `source` on the
17851
+ * internal crop result (`nativeHits` vs `tileHits`).
17704
17852
  * - `ram-fullframe` — the native surface MISSED but the request was full-frame,
17705
17853
  * so the ≤640 RAM `RetainedFrameStore` served it (honest lower-res; legit for
17706
17854
  * the blank-frame guard / 640-snapshot resolve, NOT for the clean keyFrame).
@@ -18191,12 +18339,41 @@ var RunnerLocalLoadSchema = object({
18191
18339
  * legacy `OrchestratorMetricsSchema` shape so existing dashboards keep
18192
18340
  * working unchanged when they switch to reading from the runner cap.
18193
18341
  */
18342
+ var FrameLazyCountersSchema = object({
18343
+ framesDecoded: number(),
18344
+ framesAdmitted: number(),
18345
+ framesDroppedPixelFree: number(),
18346
+ viewsMaterialized: number(),
18347
+ viewsSkipped: number(),
18348
+ workerToRunnerBytes: number(),
18349
+ runnerToPoolRawBytes: number(),
18350
+ runnerToPoolJpegBytes: number(),
18351
+ onDemandFullFrameRequests: number(),
18352
+ onDemandCropRequests: number(),
18353
+ nativeHits: number(),
18354
+ nativeMisses: number(),
18355
+ tileHits: number(),
18356
+ tileMisses: number(),
18357
+ fallbackHits: number(),
18358
+ fallbackMisses: number(),
18359
+ retainedWritesAvoided: number(),
18360
+ residentRefs: number(),
18361
+ residentBytes: number(),
18362
+ releases: number(),
18363
+ evictions: number(),
18364
+ staleMisses: number()
18365
+ });
18366
+ var FrameLazyMetricsSchema = object({
18367
+ node: FrameLazyCountersSchema,
18368
+ cameras: array(FrameLazyCountersSchema.extend({ deviceId: number() }))
18369
+ });
18194
18370
  var RunnerLocalMetricsSchema = object({
18195
18371
  nodeId: string(),
18196
18372
  activeCameras: number(),
18197
18373
  throttledCameras: number(),
18198
18374
  avgInferenceTimeMs: number(),
18199
- queueDepth: number()
18375
+ queueDepth: number(),
18376
+ frameLazy: FrameLazyMetricsSchema.optional()
18200
18377
  });
18201
18378
  method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly()), method(object({
18202
18379
  handle: FrameHandleSchema,
@@ -19496,6 +19673,9 @@ method(_void(), ProviderInfoSchema), method(object({ config: record(string(), un
19496
19673
  location: StorageLocationSchema,
19497
19674
  relativePath: string()
19498
19675
  }), _void(), { kind: "mutation" }), method(object({ location: StorageLocationSchema }), number().nullable()), method(BeginUploadInputSchema, BeginUploadResultSchema, { kind: "mutation" }), method(WriteChunkInputSchema, _void(), { kind: "mutation" }), method(FinalizeUploadInputSchema, _void(), { kind: "mutation" }), method(AbortUploadInputSchema, _void(), { kind: "mutation" }), method(BeginDownloadInputSchema, BeginDownloadResultSchema, { kind: "mutation" }), method(ReadChunkInputSchema, _instanceof(Uint8Array)), method(EndDownloadInputSchema, _void(), { kind: "mutation" });
19676
+ /** Profile-exported FormBuilder schema. Shape is ConfigUISchema at the UI. */
19677
+ var ProfileSettingsSchemaBridge = unknown().nullable();
19678
+ var ProfileSettingsBagSchema = record(string(), unknown());
19499
19679
  /**
19500
19680
  * A live terminal session hosted by the provider addon. Output and input do
19501
19681
  * NOT flow through the capability — they use the addon data plane
@@ -19525,7 +19705,14 @@ var TerminalSessionInfoSchema = object({
19525
19705
  var TerminalProfileInfoSchema = object({
19526
19706
  profileId: string(),
19527
19707
  label: string(),
19528
- description: string().optional()
19708
+ description: string().optional(),
19709
+ /** Spawn defaults the instance form copies on create. */
19710
+ executable: string().optional(),
19711
+ args: array(string()).readonly().optional(),
19712
+ cwd: string().optional(),
19713
+ environment: array(string()).readonly().optional(),
19714
+ /** ConfigUISchema for instance knobs, or null when the profile has none. */
19715
+ settingsSchema: ProfileSettingsSchemaBridge.optional()
19529
19716
  });
19530
19717
  /**
19531
19718
  * A durable operator-created Terminal instance. Profiles are templates; only
@@ -19538,7 +19725,12 @@ var TerminalInstanceInfoSchema = object({
19538
19725
  profileId: string(),
19539
19726
  profileLabel: string(),
19540
19727
  name: string(),
19541
- enabled: boolean()
19728
+ enabled: boolean(),
19729
+ executable: string(),
19730
+ args: array(string()).readonly(),
19731
+ cwd: string(),
19732
+ environment: array(string()).readonly(),
19733
+ profileSettings: ProfileSettingsBagSchema
19542
19734
  });
19543
19735
  var TerminalLegacyCameraSchema = object({
19544
19736
  stableId: string(),
@@ -19568,7 +19760,23 @@ var TerminalOutputBatchSchema = object({
19568
19760
  method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
19569
19761
  targetNodeId: string().min(1),
19570
19762
  profileId: string().min(1),
19571
- name: string().trim().min(1).max(160).optional()
19763
+ name: string().trim().min(1).max(160).optional(),
19764
+ executable: string().max(1024).optional(),
19765
+ args: array(string().max(2048)).max(64).optional(),
19766
+ cwd: string().max(1024).optional(),
19767
+ environment: array(string().max(4096)).max(64).optional(),
19768
+ profileSettings: ProfileSettingsBagSchema.optional()
19769
+ }), TerminalInstanceInfoSchema, {
19770
+ kind: "mutation",
19771
+ auth: "admin"
19772
+ }), method(object({
19773
+ instanceId: string().min(1),
19774
+ name: string().trim().min(1).max(160).optional(),
19775
+ executable: string().max(1024).optional(),
19776
+ args: array(string().max(2048)).max(64).optional(),
19777
+ cwd: string().max(1024).optional(),
19778
+ environment: array(string().max(4096)).max(64).optional(),
19779
+ profileSettings: ProfileSettingsBagSchema.optional()
19572
19780
  }), TerminalInstanceInfoSchema, {
19573
19781
  kind: "mutation",
19574
19782
  auth: "admin"
@@ -19590,7 +19798,11 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
19590
19798
  }), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
19591
19799
  profileId: string(),
19592
19800
  cols: number().int().positive(),
19593
- rows: number().int().positive()
19801
+ rows: number().int().positive(),
19802
+ executable: string().max(1024).optional(),
19803
+ args: array(string().max(2048)).max(64).optional(),
19804
+ cwd: string().max(1024).optional(),
19805
+ environment: array(string().max(4096)).max(64).optional()
19594
19806
  }), TerminalSessionInfoSchema, {
19595
19807
  kind: "mutation",
19596
19808
  auth: "admin"
@@ -22395,10 +22607,10 @@ DeviceType.LawnMower, method(object({ deviceId: number().int().nonnegative() }),
22395
22607
  *
22396
22608
  * • The SDK (mobile / web client) consumes `getConnectionEndpoints()`
22397
22609
  * to receive an ordered list of candidate base URLs it should race
22398
- * on connect — LAN IPv4 first (lowest latency when on same network),
22399
- * then public hostname (if a tunnel is up), then IPv6. The SDK can
22400
- * race them with short timeouts and stick with the winner for the
22401
- * session.
22610
+ * on connect — LAN IPv4 and stable LAN IPv6 first (lowest latency
22611
+ * when on the same network), then public hostname (if a tunnel is
22612
+ * up). The SDK can race them with short timeouts and stick with the
22613
+ * winner for the session.
22402
22614
  *
22403
22615
  * Why hub-only: agents are not directly addressable by the operator's
22404
22616
  * clients — they reverse-connect to the hub. Exposing their interfaces
@@ -22553,6 +22765,17 @@ var NotificationEndpointSchema = object({
22553
22765
  /** What the ranking currently resolves to (null when nothing is reachable). */
22554
22766
  resolved: string().nullable()
22555
22767
  });
22768
+ /**
22769
+ * The URLs the SDK / viewer should race for API access. `baseUrls` empty =
22770
+ * AUTO (every LAN IPv4 + the public tunnel). `resolved` is what that choice
22771
+ * currently expands to, so the UI can show the effective set either way.
22772
+ */
22773
+ var ViewerEndpointsSchema = object({
22774
+ /** The operator's explicit race set, or empty for AUTO. */
22775
+ baseUrls: array(string()).readonly(),
22776
+ /** What the ranking currently resolves to (may be empty if nothing is up). */
22777
+ resolved: array(string()).readonly()
22778
+ });
22556
22779
  var AllowedAddressesSchema = object({
22557
22780
  /**
22558
22781
  * Allowlist of interface addresses operators have explicitly opted
@@ -22561,6 +22784,20 @@ var AllowedAddressesSchema = object({
22561
22784
  * Network Addresses admin page and persisted by the addon.
22562
22785
  */
22563
22786
  addresses: array(string()).readonly() });
22787
+ var TlsStatusSchema = object({
22788
+ mode: _enum([
22789
+ "generated",
22790
+ "uploaded",
22791
+ "disabled"
22792
+ ]),
22793
+ leafFingerprintSha256: string().nullable(),
22794
+ caFingerprintSha256: string().nullable(),
22795
+ validTo: string().nullable(),
22796
+ sans: array(string()),
22797
+ caCertPem: string().nullable(),
22798
+ reissueError: string().nullable(),
22799
+ restartRequired: boolean()
22800
+ });
22564
22801
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
22565
22802
  /**
22566
22803
  * LEGACY HINT — do not send from new code. Kept optional so clients
@@ -22570,17 +22807,31 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
22570
22807
  */
22571
22808
  port: number().int().min(1).max(65535).optional(),
22572
22809
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
22573
- * candidate. Default `true`. */
22810
+ * candidate. Default `false` — loopback is not a client route. */
22574
22811
  includeLoopback: boolean().optional(),
22575
- /** Skip IPv6 entries. Some legacy clients can't parse them.
22576
- * Default `false`. */
22812
+ /** Skip IPv6 entries. Default `false` the palette includes stable
22813
+ * LAN IPv6 (ICE/WebRTC uses dual-stack regardless). Pass `true` to
22814
+ * hide them. The viewer HTTP/WS race is `getViewerEndpoints`. */
22577
22815
  ipv4Only: boolean().optional(),
22578
22816
  /** Scheme to emit for LAN/loopback URLs. Default `'http'`.
22579
22817
  * Pass `'https'` when the caller is itself loaded over HTTPS
22580
22818
  * to avoid mixed-content blocks in the browser. The public
22581
22819
  * tunnel always emits `https://` regardless. */
22582
22820
  scheme: _enum(["http", "https"]).optional()
22583
- }), GetConnectionEndpointsResultSchema), method(_void(), NotificationEndpointSchema), method(object({ baseUrl: string().nullable() }), NotificationEndpointSchema, { kind: "mutation" }), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
22821
+ }), GetConnectionEndpointsResultSchema), method(_void(), NotificationEndpointSchema), method(object({ baseUrl: string().nullable() }), NotificationEndpointSchema, { kind: "mutation" }), method(_void(), ViewerEndpointsSchema), method(object({ baseUrls: array(string()).readonly() }), ViewerEndpointsSchema, { kind: "mutation" }), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" }), method(_void(), TlsStatusSchema), method(object({ reason: string().optional() }), TlsStatusSchema, {
22822
+ kind: "mutation",
22823
+ auth: "admin"
22824
+ }), method(object({
22825
+ certPem: string().min(1),
22826
+ keyPem: string().min(1),
22827
+ caPem: string().optional()
22828
+ }), TlsStatusSchema, {
22829
+ kind: "mutation",
22830
+ auth: "admin"
22831
+ }), method(_void(), object({ pem: string() })), method(_void(), TlsStatusSchema, {
22832
+ kind: "mutation",
22833
+ auth: "admin"
22834
+ });
22584
22835
  object({
22585
22836
  /** Lifecycle state of the lock. `jammed` means the motor reported
22586
22837
  * failure to reach the target — operator intervention required. */
@@ -23761,7 +24012,12 @@ var PlateInfoSchema = object({
23761
24012
  plateBbox: BoundingBoxSchema.optional(),
23762
24013
  /** keyFrame parity: MediaStore key of the track's native-resolution key frame. */
23763
24014
  keyFrameMediaKey: string().optional(),
23764
- base64: string().optional()
24015
+ base64: string().optional(),
24016
+ /**
24017
+ * Same crop as a data-plane URL. `getPlateByTrack` returns this and
24018
+ * never inlines JPEG; `listPlates` still inlines for the admin-ui.
24019
+ */
24020
+ cropUrl: string().optional()
23765
24021
  });
23766
24022
  var MediaFileLiteSchema = object({
23767
24023
  key: string(),
@@ -27401,6 +27657,12 @@ Object.freeze({
27401
27657
  addonId: null,
27402
27658
  access: "view"
27403
27659
  },
27660
+ "deviceManager.getBindingsBatch": {
27661
+ capName: "device-manager",
27662
+ capScope: "system",
27663
+ addonId: null,
27664
+ access: "view"
27665
+ },
27404
27666
  "deviceManager.getChildren": {
27405
27667
  capName: "device-manager",
27406
27668
  capScope: "system",
@@ -27461,6 +27723,12 @@ Object.freeze({
27461
27723
  addonId: null,
27462
27724
  access: "view"
27463
27725
  },
27726
+ "deviceManager.getLinkedDevicesBatch": {
27727
+ capName: "device-manager",
27728
+ capScope: "system",
27729
+ addonId: null,
27730
+ access: "view"
27731
+ },
27464
27732
  "deviceManager.getRoleDisplayDefaults": {
27465
27733
  capName: "device-manager",
27466
27734
  capScope: "system",
@@ -28343,6 +28611,12 @@ Object.freeze({
28343
28611
  addonId: null,
28344
28612
  access: "create"
28345
28613
  },
28614
+ "localNetwork.downloadCa": {
28615
+ capName: "local-network",
28616
+ capScope: "system",
28617
+ addonId: null,
28618
+ access: "view"
28619
+ },
28346
28620
  "localNetwork.getAllowedAddresses": {
28347
28621
  capName: "local-network",
28348
28622
  capScope: "system",
@@ -28367,18 +28641,42 @@ Object.freeze({
28367
28641
  addonId: null,
28368
28642
  access: "view"
28369
28643
  },
28644
+ "localNetwork.getTlsStatus": {
28645
+ capName: "local-network",
28646
+ capScope: "system",
28647
+ addonId: null,
28648
+ access: "view"
28649
+ },
28650
+ "localNetwork.getViewerEndpoints": {
28651
+ capName: "local-network",
28652
+ capScope: "system",
28653
+ addonId: null,
28654
+ access: "view"
28655
+ },
28370
28656
  "localNetwork.list": {
28371
28657
  capName: "local-network",
28372
28658
  capScope: "system",
28373
28659
  addonId: null,
28374
28660
  access: "view"
28375
28661
  },
28662
+ "localNetwork.regenerateCertificate": {
28663
+ capName: "local-network",
28664
+ capScope: "system",
28665
+ addonId: null,
28666
+ access: "create"
28667
+ },
28376
28668
  "localNetwork.resetAllowlistToBestMatch": {
28377
28669
  capName: "local-network",
28378
28670
  capScope: "system",
28379
28671
  addonId: null,
28380
28672
  access: "delete"
28381
28673
  },
28674
+ "localNetwork.revertToGeneratedCertificate": {
28675
+ capName: "local-network",
28676
+ capScope: "system",
28677
+ addonId: null,
28678
+ access: "create"
28679
+ },
28382
28680
  "localNetwork.setAllowedAddresses": {
28383
28681
  capName: "local-network",
28384
28682
  capScope: "system",
@@ -28391,6 +28689,18 @@ Object.freeze({
28391
28689
  addonId: null,
28392
28690
  access: "create"
28393
28691
  },
28692
+ "localNetwork.setViewerEndpoints": {
28693
+ capName: "local-network",
28694
+ capScope: "system",
28695
+ addonId: null,
28696
+ access: "create"
28697
+ },
28698
+ "localNetwork.uploadCertificate": {
28699
+ capName: "local-network",
28700
+ capScope: "system",
28701
+ addonId: null,
28702
+ access: "create"
28703
+ },
28394
28704
  "lockControl.lock": {
28395
28705
  capName: "lock-control",
28396
28706
  capScope: "device",
@@ -29189,6 +29499,12 @@ Object.freeze({
29189
29499
  addonId: null,
29190
29500
  access: "view"
29191
29501
  },
29502
+ "pipelineAnalytics.getGroup": {
29503
+ capName: "pipeline-analytics",
29504
+ capScope: "device",
29505
+ addonId: null,
29506
+ access: "view"
29507
+ },
29192
29508
  "pipelineAnalytics.getKeyEvents": {
29193
29509
  capName: "pipeline-analytics",
29194
29510
  capScope: "device",
@@ -29273,6 +29589,12 @@ Object.freeze({
29273
29589
  addonId: null,
29274
29590
  access: "view"
29275
29591
  },
29592
+ "pipelineAnalytics.listGroups": {
29593
+ capName: "pipeline-analytics",
29594
+ capScope: "device",
29595
+ addonId: null,
29596
+ access: "view"
29597
+ },
29276
29598
  "pipelineAnalytics.listOpsLog": {
29277
29599
  capName: "pipeline-analytics",
29278
29600
  capScope: "device",
@@ -31271,6 +31593,12 @@ Object.freeze({
31271
31593
  addonId: null,
31272
31594
  access: "create"
31273
31595
  },
31596
+ "terminalSession.updateInstance": {
31597
+ capName: "terminal-session",
31598
+ capScope: "system",
31599
+ addonId: null,
31600
+ access: "create"
31601
+ },
31274
31602
  "terminalSession.writeInput": {
31275
31603
  capName: "terminal-session",
31276
31604
  capScope: "system",
@@ -32048,6 +32376,11 @@ Object.freeze({
32048
32376
  form: "single",
32049
32377
  optional: false
32050
32378
  }],
32379
+ "deviceManager.getBindingsBatch": [{
32380
+ name: "deviceIds",
32381
+ form: "array",
32382
+ optional: false
32383
+ }],
32051
32384
  "deviceManager.getChildren": [{
32052
32385
  name: "parentDeviceId",
32053
32386
  form: "single",
@@ -32093,6 +32426,11 @@ Object.freeze({
32093
32426
  form: "single",
32094
32427
  optional: false
32095
32428
  }],
32429
+ "deviceManager.getLinkedDevicesBatch": [{
32430
+ name: "deviceIds",
32431
+ form: "array",
32432
+ optional: false
32433
+ }],
32096
32434
  "deviceManager.getSettingsSchema": [{
32097
32435
  name: "deviceId",
32098
32436
  form: "single",
@@ -32113,6 +32451,11 @@ Object.freeze({
32113
32451
  form: "single",
32114
32452
  optional: false
32115
32453
  }],
32454
+ "deviceManager.listAll": [{
32455
+ name: "deviceIds",
32456
+ form: "array",
32457
+ optional: true
32458
+ }],
32116
32459
  "deviceManager.loadConfig": [{
32117
32460
  name: "deviceId",
32118
32461
  form: "single",
@@ -32686,6 +33029,11 @@ Object.freeze({
32686
33029
  form: "single",
32687
33030
  optional: false
32688
33031
  }],
33032
+ "pipelineAnalytics.getGroup": [{
33033
+ name: "deviceId",
33034
+ form: "single",
33035
+ optional: false
33036
+ }],
32689
33037
  "pipelineAnalytics.getKeyEvents": [{
32690
33038
  name: "deviceId",
32691
33039
  form: "single",
@@ -32741,6 +33089,11 @@ Object.freeze({
32741
33089
  form: "array",
32742
33090
  optional: false
32743
33091
  }],
33092
+ "pipelineAnalytics.listGroups": [{
33093
+ name: "deviceIds",
33094
+ form: "array",
33095
+ optional: false
33096
+ }],
32744
33097
  "pipelineAnalytics.listOpsLog": [{
32745
33098
  name: "deviceId",
32746
33099
  form: "single",
@@ -33758,6 +34111,35 @@ Object.freeze(Object.fromEntries([{
33758
34111
  }]
33759
34112
  }].map((s) => [s.stepId, s.defaultModelId])));
33760
34113
  string().min(1);
34114
+ var CLUSTER_STEP_SETTING_FIELDS = [{
34115
+ stepId: "face-embedding",
34116
+ key: "minLandmarkFaceSize",
34117
+ label: "Min face size for recognition (detection px)",
34118
+ description: "Refuse to embed a face smaller than this IN THE DETECTION FRAME. Applies to every node — the enrolled gallery is one index, and two admission floors would fill it from two policies. 0 disables the gate.",
34119
+ type: "slider",
34120
+ min: 0,
34121
+ max: 64,
34122
+ step: 2,
34123
+ default: 24
34124
+ }];
34125
+ function clusterStepSettingKey(stepId, fieldKey) {
34126
+ return `clusterStepSetting:${stepId}:${fieldKey}`;
34127
+ }
34128
+ var ClusterSettingNumberSchema = number().finite();
34129
+ function readClusterStepSettings(config) {
34130
+ const out = {};
34131
+ for (const field of CLUSTER_STEP_SETTING_FIELDS) {
34132
+ const parsed = ClusterSettingNumberSchema.safeParse(config[clusterStepSettingKey(field.stepId, field.key)]);
34133
+ const value = parsed.success ? parsed.data : field.default;
34134
+ const existing = out[field.stepId] ?? {};
34135
+ out[field.stepId] = {
34136
+ ...existing,
34137
+ [field.key]: value
34138
+ };
34139
+ }
34140
+ return out;
34141
+ }
34142
+ readClusterStepSettings({});
33761
34143
  object({
33762
34144
  /**
33763
34145
  * Fraction of the box's own size added on EACH side before cutting.