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