@camstack/addon-provider-ecowitt 0.2.25 → 0.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.
Files changed (3) hide show
  1. package/dist/addon.js +432 -50
  2. package/dist/addon.mjs +432 -50
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -5804,6 +5804,13 @@ var BaseAddon = class {
5804
5804
  _readinessGeneration = typeof crypto !== "undefined" && crypto.randomUUID ? crypto.randomUUID() : Math.random().toString(36).slice(2, 14);
5805
5805
  /** Capability names this addon registered at init — used to emit matching `down` events on shutdown. */
5806
5806
  _registeredCapNames = [];
5807
+ /**
5808
+ * True only after `readAddonStore` actually answered. Constructor
5809
+ * defaults look like stored config when the store is down — a forked
5810
+ * addon that auto-starts from those defaults (cloudflare-tunnel quick
5811
+ * mode, 2026-08-25) is not "the operator chose this".
5812
+ */
5813
+ settingsStoreReady = false;
5807
5814
  /** Default config values. Provided via constructor. */
5808
5815
  defaults;
5809
5816
  constructor(defaults) {
@@ -6204,7 +6211,9 @@ var BaseAddon = class {
6204
6211
  ];
6205
6212
  let lastErr;
6206
6213
  for (let attempt = 0; attempt <= delaysMs.length; attempt++) try {
6207
- return await settings.readAddonStore() ?? {};
6214
+ const stored = await settings.readAddonStore() ?? {};
6215
+ this.settingsStoreReady = true;
6216
+ return stored;
6208
6217
  } catch (err) {
6209
6218
  lastErr = err;
6210
6219
  const msg = err instanceof Error ? err.message : String(err);
@@ -6212,6 +6221,7 @@ var BaseAddon = class {
6212
6221
  if (attempt === delaysMs.length) break;
6213
6222
  await new Promise((r) => setTimeout(r, delaysMs[attempt]));
6214
6223
  }
6224
+ this.settingsStoreReady = false;
6215
6225
  this._ctx?.logger?.warn?.("readAddonStore: settings-store unavailable after retries — using defaults", { meta: { error: lastErr instanceof Error ? lastErr.message : String(lastErr) } });
6216
6226
  return {};
6217
6227
  }
@@ -8023,6 +8033,15 @@ var LabelDefinitionSchema = object({
8023
8033
  description: string().optional(),
8024
8034
  icon: string().optional()
8025
8035
  });
8036
+ var ClassMapDefinitionSchema = object({
8037
+ mapping: record(string(), _enum([
8038
+ "person",
8039
+ "vehicle",
8040
+ "animal",
8041
+ "package"
8042
+ ])),
8043
+ preserveOriginal: boolean()
8044
+ });
8026
8045
  var MODEL_FORMATS = [
8027
8046
  "onnx",
8028
8047
  "coreml",
@@ -8106,6 +8125,12 @@ var ModelVariantGroupSchema = object({
8106
8125
  */
8107
8126
  resolution: number().int().positive().optional()
8108
8127
  });
8128
+ var ModelProviderIdSchema = _enum([
8129
+ "camstack",
8130
+ "frigate",
8131
+ "scrypted",
8132
+ "custom"
8133
+ ]);
8109
8134
  var ModelCatalogEntrySchema = object({
8110
8135
  id: string(),
8111
8136
  name: string(),
@@ -8201,7 +8226,19 @@ var ModelCatalogEntrySchema = object({
8201
8226
  * `id` stays the source of truth for resolution/download/persistence; grouping
8202
8227
  * is a presentation overlay resolved back to an `id`.
8203
8228
  */
8204
- group: ModelVariantGroupSchema.optional()
8229
+ group: ModelVariantGroupSchema.optional(),
8230
+ /**
8231
+ * Catalog source for the pipeline stepper's provider-first picker. Absent on
8232
+ * built-in CamStack entries (treated as `camstack`) and on registry rows
8233
+ * persisted before this field existed (`inferModelProvider` fills those).
8234
+ */
8235
+ provider: ModelProviderIdSchema.optional(),
8236
+ /**
8237
+ * Per-MODEL class map override. Absent ⇒ the step's `StepDefinition.classMap`
8238
+ * applies (Frigate / COCO public catalog). Set on a custom model whose raw
8239
+ * labels already ARE the CamStack macros (Scrypted identity map).
8240
+ */
8241
+ classMap: ClassMapDefinitionSchema.optional()
8205
8242
  });
8206
8243
  var ConvertTargetSchema = discriminatedUnion("format", [object({
8207
8244
  format: literal("openvino"),
@@ -8230,7 +8267,8 @@ var ModelConvertMetadataSchema = object({
8230
8267
  "ocr",
8231
8268
  "segmentation"
8232
8269
  ]),
8233
- faceAlignment: boolean().optional()
8270
+ faceAlignment: boolean().optional(),
8271
+ classMap: ClassMapDefinitionSchema.optional()
8234
8272
  });
8235
8273
  var ConvertResultSchema = object({
8236
8274
  entry: ModelCatalogEntrySchema,
@@ -11987,6 +12025,27 @@ var LinkedDeviceSchema = object({
11987
12025
  features: array(string()),
11988
12026
  producesTrackedEvents: boolean().optional()
11989
12027
  });
12028
+ /** One camera's resolved linked set, tagged with the camera it belongs to.
12029
+ * The batch answer needs the tag; the single-device answer already has it
12030
+ * from the input, which is why `getLinkedDevices` keeps the untagged shape. */
12031
+ var LinkedDevicesForDeviceSchema = object({
12032
+ deviceId: number(),
12033
+ mode: LinkedDevicesModeSchema,
12034
+ devices: array(LinkedDeviceSchema)
12035
+ });
12036
+ /** One device's binding map — the shape `getBindings`, `getBindingsBatch` and
12037
+ * `getAllBindings` all answer in. Declared once: three copies of the same
12038
+ * object literal is exactly how the three drift apart. */
12039
+ var DeviceBindingsForDeviceSchema = object({
12040
+ deviceId: number(),
12041
+ entries: array(object({
12042
+ capName: string(),
12043
+ kind: _enum(["native", "wrapped"]),
12044
+ providerAddonId: string(),
12045
+ providerNodeId: string(),
12046
+ nativeAddonId: string()
12047
+ }))
12048
+ });
11990
12049
  var SavedDeviceRowSchema = object({
11991
12050
  /** Numeric id reserved at allocateDeviceId time. */
11992
12051
  id: number(),
@@ -12212,11 +12271,25 @@ method(object({
12212
12271
  projection: _enum(["full", "slim"]).optional(),
12213
12272
  /** Return only camera devices. Filtering server-side instead of
12214
12273
  * shipping 293 rows to find 12. */
12215
- isCamera: boolean().optional()
12274
+ isCamera: boolean().optional(),
12275
+ /**
12276
+ * Return only these device ids. For the caller that already KNOWS the
12277
+ * handful it wants and needs a field the id-bearing answer does not
12278
+ * carry — the viewer's linked-devices panel joins `type` and `online`
12279
+ * onto ~8 linked ids and, unfiltered, dragged the fleet across to do
12280
+ * it: 433 KB slim / 958 KB full for 967 devices, on a query that
12281
+ * refetches on the reconcile interval, on a phone.
12282
+ *
12283
+ * Safe to send at a hub that predates it: Zod STRIPS unknown input
12284
+ * keys rather than rejecting them (verified against the live hub
12285
+ * 2026-08-25 — 967 rows came back), so an old hub answers exactly what
12286
+ * it answers today and the caller filters as it already does.
12287
+ */
12288
+ deviceIds: array(number()).optional()
12216
12289
  }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
12217
12290
  mode: LinkedDevicesModeSchema,
12218
12291
  devices: array(LinkedDeviceSchema)
12219
- })), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
12292
+ })), 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({
12220
12293
  deviceId: number(),
12221
12294
  values: record(string(), unknown())
12222
12295
  }), object({ success: literal(true) }), {
@@ -12243,25 +12316,7 @@ method(object({
12243
12316
  }), method(object({ deviceId: number() }), array(StreamProbeResultSchema), {
12244
12317
  kind: "mutation",
12245
12318
  auth: "admin"
12246
- }), method(object({ deviceId: number() }), object({
12247
- deviceId: number(),
12248
- entries: array(object({
12249
- capName: string(),
12250
- kind: _enum(["native", "wrapped"]),
12251
- providerAddonId: string(),
12252
- providerNodeId: string(),
12253
- nativeAddonId: string()
12254
- }))
12255
- })), method(object({}), array(object({
12256
- deviceId: number(),
12257
- entries: array(object({
12258
- capName: string(),
12259
- kind: _enum(["native", "wrapped"]),
12260
- providerAddonId: string(),
12261
- providerNodeId: string(),
12262
- nativeAddonId: string()
12263
- }))
12264
- }))), method(object({
12319
+ }), method(object({ deviceId: number() }), DeviceBindingsForDeviceSchema), method(object({ deviceIds: array(number()) }), array(DeviceBindingsForDeviceSchema)), method(object({}), array(DeviceBindingsForDeviceSchema)), method(object({
12265
12320
  deviceId: number(),
12266
12321
  capName: string(),
12267
12322
  wrapperAddonId: string(),
@@ -14671,12 +14726,15 @@ var NcOccupancyConditionSchema = object({
14671
14726
  * there is no second switch that can disagree with the first and every rule
14672
14727
  * authored before the decision migrates for free (`audioModeOf`):
14673
14728
  *
14674
- * - **LABEL mode — `labels` present.** The rule fires on the FIRST frame the
14675
- * classifier labels with one of them. No window, no percentage:
14676
- * `hitPercent` and `samplingSeconds` are ignored, and the rule's own
14677
- * `throttle` cooldown is the only brake. The per-label confidence floor is
14678
- * the analyzer's (`classificationMinScore`, per device) a label only
14679
- * reaches this condition if the classifier was already confident enough.
14729
+ * - **LABEL mode — `labels` present.** The rule fires when `confirmHits`
14730
+ * labelled frames land inside `confirmWindowSec` (default 2 in 5 s).
14731
+ * `hitPercent` and `samplingSeconds` are still ignored a percentage of
14732
+ * frames is the wrong question for a classifier that labels 1–3 frames
14733
+ * per episode. The count window is the brake that drops a single-frame
14734
+ * false positive; the rule's own `throttle` cooldown is the other. The
14735
+ * per-label confidence floor is the analyzer's (`classificationMinScore`,
14736
+ * per device) — a label only reaches this condition if the classifier was
14737
+ * already confident enough. `confirmHits: 1` restores first-frame fire.
14680
14738
  * - **LEVEL mode — `dbThreshold` present, no labels.** The sampling window IS
14681
14739
  * the condition: at least `hitPercent`% of the samples over
14682
14740
  * `samplingSeconds` must be at or above `dbThreshold` dBFS (see
@@ -14703,14 +14761,22 @@ var NcOccupancyConditionSchema = object({
14703
14761
  * an operator who typed `dog` mean the same thing.
14704
14762
  */
14705
14763
  var NcAudioConditionSchema = object({
14706
- /** LABEL MODE: audio macro labels. Present ⇒ fires on the first labelled frame. */
14764
+ /** LABEL MODE: audio macro labels. Present ⇒ count-in-window confirm. */
14707
14765
  labels: array(string().min(1)).min(1).optional(),
14708
14766
  /** LEVEL MODE: floor in dBFS (negative-going, `0` = full scale). */
14709
14767
  dbThreshold: number().min(-96).max(0).optional(),
14710
14768
  /** LEVEL MODE ONLY: percentage of the window's samples that must be hits (1–100). */
14711
14769
  hitPercent: number().int().min(1).max(100).default(60),
14712
14770
  /** LEVEL MODE ONLY: length of the sampling window in seconds. */
14713
- samplingSeconds: number().int().min(1).max(300).default(10)
14771
+ samplingSeconds: number().int().min(1).max(300).default(10),
14772
+ /**
14773
+ * LABEL MODE: how many labelled frames must land inside
14774
+ * {@link NcAudioConditionSchema.shape.confirmWindowSec} before dispatch.
14775
+ * Absent ⇒ 2 (the matcher default). `1` is first-frame fire.
14776
+ */
14777
+ confirmHits: number().int().min(1).max(20).optional(),
14778
+ /** LABEL MODE: the window those frames must share, in seconds. Absent ⇒ 5. */
14779
+ confirmWindowSec: number().int().min(1).max(60).optional()
14714
14780
  });
14715
14781
  /**
14716
14782
  * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
@@ -17084,6 +17150,46 @@ var RecentTracksPageSchema = object({
17084
17150
  /** Cursor for the next page, or null when this page is the last. */
17085
17151
  nextCursor: string().nullable()
17086
17152
  });
17153
+ var LIST_GROUPS_DEFAULT_LIMIT = 40;
17154
+ var LIST_GROUPS_MAX_LIMIT = 100;
17155
+ var AnalyticsGroupRecordSchema = object({
17156
+ id: string(),
17157
+ deviceId: number().int(),
17158
+ openedAt: number().int(),
17159
+ closedAt: number().int(),
17160
+ timestamp: number().int(),
17161
+ memberCount: number().int(),
17162
+ memberTrackIds: array(string()).readonly(),
17163
+ className: string(),
17164
+ classes: array(string()).readonly(),
17165
+ /** Relative event-media path, or null when the group has no picture yet. */
17166
+ mediaUrl: string().nullable(),
17167
+ singleton: boolean()
17168
+ });
17169
+ var AnalyticsGroupMemberSchema = object({
17170
+ trackId: string(),
17171
+ deviceId: number().int(),
17172
+ className: string(),
17173
+ firstSeen: number().int(),
17174
+ lastSeen: number().int(),
17175
+ mediaUrl: string().nullable()
17176
+ });
17177
+ var AnalyticsGroupDetailSchema = AnalyticsGroupRecordSchema.extend({ members: array(AnalyticsGroupMemberSchema).readonly() });
17178
+ var ListGroupsQueryInput = object({
17179
+ /** Devices to merge. An empty array yields `{ groups: [], nextCursor: null }`. */
17180
+ deviceIds: array(number()),
17181
+ /** Window lower bound on `closedAt` (inclusive). */
17182
+ since: number().optional(),
17183
+ /** Window upper bound on `openedAt` (inclusive). */
17184
+ until: number().optional(),
17185
+ limit: number().int().min(1).max(LIST_GROUPS_MAX_LIMIT).default(LIST_GROUPS_DEFAULT_LIMIT),
17186
+ /** Opaque continuation cursor from a previous page's `nextCursor`. */
17187
+ cursor: string().optional()
17188
+ });
17189
+ var ListGroupsPageSchema = object({
17190
+ groups: array(AnalyticsGroupRecordSchema).readonly(),
17191
+ nextCursor: string().nullable()
17192
+ });
17087
17193
  var KeyEventQueryInput = object({
17088
17194
  deviceId: number(),
17089
17195
  /** Window lower bound (track firstSeen ≥ since). */
@@ -17159,7 +17265,9 @@ var TrackCascadeCountsSchema = object({
17159
17265
  /** Unassigned plate reads removed (best-effort; plate leg deferred to plate-intelligence). */
17160
17266
  plates: number().int(),
17161
17267
  /** Per-track CLIP search vectors removed (best-effort). */
17162
- embeddings: number().int()
17268
+ embeddings: number().int(),
17269
+ /** Group membership + group rows removed with their last member (best-effort). */
17270
+ groups: number().int()
17163
17271
  });
17164
17272
  /** Disk-wins reconcile: media rows whose blobs are gone, then empty tracks. */
17165
17273
  var DiskReconcileCountsSchema = object({
@@ -17305,7 +17413,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
17305
17413
  * stationary registry). Default false: the timeline lists passages,
17306
17414
  * not parking records (operator decision, 2026-08-15). */
17307
17415
  includeStationary: boolean().optional()
17308
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
17416
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(ListGroupsQueryInput, ListGroupsPageSchema), method(object({
17417
+ deviceId: number(),
17418
+ groupId: string().min(1)
17419
+ }), AnalyticsGroupDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
17309
17420
  kind: "mutation",
17310
17421
  auth: "admin"
17311
17422
  }), 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({
@@ -17523,6 +17634,33 @@ var NativeCropRefSchema = object({
17523
17634
  h: number()
17524
17635
  })
17525
17636
  });
17637
+ object({
17638
+ crop: object({
17639
+ left: number(),
17640
+ top: number(),
17641
+ width: number().positive(),
17642
+ height: number().positive()
17643
+ }).optional(),
17644
+ content: object({
17645
+ width: number().int().positive(),
17646
+ height: number().int().positive()
17647
+ }),
17648
+ fit: _enum(["stretch", "contain"]),
17649
+ format: _enum([
17650
+ "rgb",
17651
+ "gray",
17652
+ "jpeg"
17653
+ ])
17654
+ });
17655
+ var FrameRefSchema = object({
17656
+ registryId: string().min(1),
17657
+ id: string().min(1),
17658
+ width: number().int().positive(),
17659
+ height: number().int().positive(),
17660
+ format: _enum(["rgb", "gray"]),
17661
+ timestamp: number(),
17662
+ capturedAt: number().optional()
17663
+ });
17526
17664
  var ModelFormatSchema$1 = _enum([
17527
17665
  "onnx",
17528
17666
  "coreml",
@@ -17588,7 +17726,8 @@ var PipelineModelOptionSchema = object({
17588
17726
  sizeMB: number()
17589
17727
  })),
17590
17728
  group: ModelVariantGroupSchema.optional(),
17591
- legacy: boolean().optional()
17729
+ legacy: boolean().optional(),
17730
+ provider: ModelProviderIdSchema.optional()
17592
17731
  });
17593
17732
  var ConfigFieldBridge = custom();
17594
17733
  var PipelineAddonSchemaSchema = object({
@@ -17767,6 +17906,12 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
17767
17906
  steps: array(PipelineStepInputSchema).min(1),
17768
17907
  frame: FrameInputSchema.optional(),
17769
17908
  /**
17909
+ * Process-local lazy frame. Valid only when caller and provider resolve
17910
+ * in the same execution-group process; split/cross-node callers use
17911
+ * `frame`/`image` inline compatibility instead.
17912
+ */
17913
+ frameRef: FrameRefSchema.optional(),
17914
+ /**
17770
17915
  * CB5 shm passthrough — a `FrameHandle` naming the same ring slot
17771
17916
  * the decoded pixels live in. One more member of the one-of
17772
17917
  * frame/frameHandle/image/imageBase64/referenceImage group.
@@ -18062,7 +18207,10 @@ var NativeCropResultSchema = object({
18062
18207
  * Which source served this crop, so a quality-sensitive consumer (the native
18063
18208
  * `keyFrame`) can reject a degraded fallback:
18064
18209
  * - `native` — cut from the decode worker's retained NATIVE surface (the
18065
- * quality path).
18210
+ * quality path). A subject-tile serve is also native-resolution and stays
18211
+ * `native` here: the public enum cannot name `tile` without a breaking cap
18212
+ * change. Runner telemetry distinguishes lease vs tile via `source` on the
18213
+ * internal crop result (`nativeHits` vs `tileHits`).
18066
18214
  * - `ram-fullframe` — the native surface MISSED but the request was full-frame,
18067
18215
  * so the ≤640 RAM `RetainedFrameStore` served it (honest lower-res; legit for
18068
18216
  * the blank-frame guard / 640-snapshot resolve, NOT for the clean keyFrame).
@@ -18553,12 +18701,41 @@ var RunnerLocalLoadSchema = object({
18553
18701
  * legacy `OrchestratorMetricsSchema` shape so existing dashboards keep
18554
18702
  * working unchanged when they switch to reading from the runner cap.
18555
18703
  */
18704
+ var FrameLazyCountersSchema = object({
18705
+ framesDecoded: number(),
18706
+ framesAdmitted: number(),
18707
+ framesDroppedPixelFree: number(),
18708
+ viewsMaterialized: number(),
18709
+ viewsSkipped: number(),
18710
+ workerToRunnerBytes: number(),
18711
+ runnerToPoolRawBytes: number(),
18712
+ runnerToPoolJpegBytes: number(),
18713
+ onDemandFullFrameRequests: number(),
18714
+ onDemandCropRequests: number(),
18715
+ nativeHits: number(),
18716
+ nativeMisses: number(),
18717
+ tileHits: number(),
18718
+ tileMisses: number(),
18719
+ fallbackHits: number(),
18720
+ fallbackMisses: number(),
18721
+ retainedWritesAvoided: number(),
18722
+ residentRefs: number(),
18723
+ residentBytes: number(),
18724
+ releases: number(),
18725
+ evictions: number(),
18726
+ staleMisses: number()
18727
+ });
18728
+ var FrameLazyMetricsSchema = object({
18729
+ node: FrameLazyCountersSchema,
18730
+ cameras: array(FrameLazyCountersSchema.extend({ deviceId: number() }))
18731
+ });
18556
18732
  var RunnerLocalMetricsSchema = object({
18557
18733
  nodeId: string(),
18558
18734
  activeCameras: number(),
18559
18735
  throttledCameras: number(),
18560
18736
  avgInferenceTimeMs: number(),
18561
- queueDepth: number()
18737
+ queueDepth: number(),
18738
+ frameLazy: FrameLazyMetricsSchema.optional()
18562
18739
  });
18563
18740
  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({
18564
18741
  handle: FrameHandleSchema,
@@ -19858,6 +20035,9 @@ method(_void(), ProviderInfoSchema), method(object({ config: record(string(), un
19858
20035
  location: StorageLocationSchema,
19859
20036
  relativePath: string()
19860
20037
  }), _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" });
20038
+ /** Profile-exported FormBuilder schema. Shape is ConfigUISchema at the UI. */
20039
+ var ProfileSettingsSchemaBridge = unknown().nullable();
20040
+ var ProfileSettingsBagSchema = record(string(), unknown());
19861
20041
  /**
19862
20042
  * A live terminal session hosted by the provider addon. Output and input do
19863
20043
  * NOT flow through the capability — they use the addon data plane
@@ -19887,7 +20067,14 @@ var TerminalSessionInfoSchema = object({
19887
20067
  var TerminalProfileInfoSchema = object({
19888
20068
  profileId: string(),
19889
20069
  label: string(),
19890
- description: string().optional()
20070
+ description: string().optional(),
20071
+ /** Spawn defaults the instance form copies on create. */
20072
+ executable: string().optional(),
20073
+ args: array(string()).readonly().optional(),
20074
+ cwd: string().optional(),
20075
+ environment: array(string()).readonly().optional(),
20076
+ /** ConfigUISchema for instance knobs, or null when the profile has none. */
20077
+ settingsSchema: ProfileSettingsSchemaBridge.optional()
19891
20078
  });
19892
20079
  /**
19893
20080
  * A durable operator-created Terminal instance. Profiles are templates; only
@@ -19900,7 +20087,12 @@ var TerminalInstanceInfoSchema = object({
19900
20087
  profileId: string(),
19901
20088
  profileLabel: string(),
19902
20089
  name: string(),
19903
- enabled: boolean()
20090
+ enabled: boolean(),
20091
+ executable: string(),
20092
+ args: array(string()).readonly(),
20093
+ cwd: string(),
20094
+ environment: array(string()).readonly(),
20095
+ profileSettings: ProfileSettingsBagSchema
19904
20096
  });
19905
20097
  var TerminalLegacyCameraSchema = object({
19906
20098
  stableId: string(),
@@ -19930,7 +20122,23 @@ var TerminalOutputBatchSchema = object({
19930
20122
  method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
19931
20123
  targetNodeId: string().min(1),
19932
20124
  profileId: string().min(1),
19933
- name: string().trim().min(1).max(160).optional()
20125
+ name: string().trim().min(1).max(160).optional(),
20126
+ executable: string().max(1024).optional(),
20127
+ args: array(string().max(2048)).max(64).optional(),
20128
+ cwd: string().max(1024).optional(),
20129
+ environment: array(string().max(4096)).max(64).optional(),
20130
+ profileSettings: ProfileSettingsBagSchema.optional()
20131
+ }), TerminalInstanceInfoSchema, {
20132
+ kind: "mutation",
20133
+ auth: "admin"
20134
+ }), method(object({
20135
+ instanceId: string().min(1),
20136
+ name: string().trim().min(1).max(160).optional(),
20137
+ executable: string().max(1024).optional(),
20138
+ args: array(string().max(2048)).max(64).optional(),
20139
+ cwd: string().max(1024).optional(),
20140
+ environment: array(string().max(4096)).max(64).optional(),
20141
+ profileSettings: ProfileSettingsBagSchema.optional()
19934
20142
  }), TerminalInstanceInfoSchema, {
19935
20143
  kind: "mutation",
19936
20144
  auth: "admin"
@@ -19952,7 +20160,11 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
19952
20160
  }), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
19953
20161
  profileId: string(),
19954
20162
  cols: number().int().positive(),
19955
- rows: number().int().positive()
20163
+ rows: number().int().positive(),
20164
+ executable: string().max(1024).optional(),
20165
+ args: array(string().max(2048)).max(64).optional(),
20166
+ cwd: string().max(1024).optional(),
20167
+ environment: array(string().max(4096)).max(64).optional()
19956
20168
  }), TerminalSessionInfoSchema, {
19957
20169
  kind: "mutation",
19958
20170
  auth: "admin"
@@ -23827,10 +24039,10 @@ var lawnMowerControlCapability = {
23827
24039
  *
23828
24040
  * • The SDK (mobile / web client) consumes `getConnectionEndpoints()`
23829
24041
  * to receive an ordered list of candidate base URLs it should race
23830
- * on connect — LAN IPv4 first (lowest latency when on same network),
23831
- * then public hostname (if a tunnel is up), then IPv6. The SDK can
23832
- * race them with short timeouts and stick with the winner for the
23833
- * session.
24042
+ * on connect — LAN IPv4 and stable LAN IPv6 first (lowest latency
24043
+ * when on the same network), then public hostname (if a tunnel is
24044
+ * up). The SDK can race them with short timeouts and stick with the
24045
+ * winner for the session.
23834
24046
  *
23835
24047
  * Why hub-only: agents are not directly addressable by the operator's
23836
24048
  * clients — they reverse-connect to the hub. Exposing their interfaces
@@ -23985,6 +24197,17 @@ var NotificationEndpointSchema = object({
23985
24197
  /** What the ranking currently resolves to (null when nothing is reachable). */
23986
24198
  resolved: string().nullable()
23987
24199
  });
24200
+ /**
24201
+ * The URLs the SDK / viewer should race for API access. `baseUrls` empty =
24202
+ * AUTO (every LAN IPv4 + the public tunnel). `resolved` is what that choice
24203
+ * currently expands to, so the UI can show the effective set either way.
24204
+ */
24205
+ var ViewerEndpointsSchema = object({
24206
+ /** The operator's explicit race set, or empty for AUTO. */
24207
+ baseUrls: array(string()).readonly(),
24208
+ /** What the ranking currently resolves to (may be empty if nothing is up). */
24209
+ resolved: array(string()).readonly()
24210
+ });
23988
24211
  var AllowedAddressesSchema = object({
23989
24212
  /**
23990
24213
  * Allowlist of interface addresses operators have explicitly opted
@@ -23993,6 +24216,20 @@ var AllowedAddressesSchema = object({
23993
24216
  * Network Addresses admin page and persisted by the addon.
23994
24217
  */
23995
24218
  addresses: array(string()).readonly() });
24219
+ var TlsStatusSchema = object({
24220
+ mode: _enum([
24221
+ "generated",
24222
+ "uploaded",
24223
+ "disabled"
24224
+ ]),
24225
+ leafFingerprintSha256: string().nullable(),
24226
+ caFingerprintSha256: string().nullable(),
24227
+ validTo: string().nullable(),
24228
+ sans: array(string()),
24229
+ caCertPem: string().nullable(),
24230
+ reissueError: string().nullable(),
24231
+ restartRequired: boolean()
24232
+ });
23996
24233
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
23997
24234
  /**
23998
24235
  * LEGACY HINT — do not send from new code. Kept optional so clients
@@ -24002,17 +24239,31 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
24002
24239
  */
24003
24240
  port: number().int().min(1).max(65535).optional(),
24004
24241
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
24005
- * candidate. Default `true`. */
24242
+ * candidate. Default `false` — loopback is not a client route. */
24006
24243
  includeLoopback: boolean().optional(),
24007
- /** Skip IPv6 entries. Some legacy clients can't parse them.
24008
- * Default `false`. */
24244
+ /** Skip IPv6 entries. Default `false` the palette includes stable
24245
+ * LAN IPv6 (ICE/WebRTC uses dual-stack regardless). Pass `true` to
24246
+ * hide them. The viewer HTTP/WS race is `getViewerEndpoints`. */
24009
24247
  ipv4Only: boolean().optional(),
24010
24248
  /** Scheme to emit for LAN/loopback URLs. Default `'http'`.
24011
24249
  * Pass `'https'` when the caller is itself loaded over HTTPS
24012
24250
  * to avoid mixed-content blocks in the browser. The public
24013
24251
  * tunnel always emits `https://` regardless. */
24014
24252
  scheme: _enum(["http", "https"]).optional()
24015
- }), 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" });
24253
+ }), 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, {
24254
+ kind: "mutation",
24255
+ auth: "admin"
24256
+ }), method(object({
24257
+ certPem: string().min(1),
24258
+ keyPem: string().min(1),
24259
+ caPem: string().optional()
24260
+ }), TlsStatusSchema, {
24261
+ kind: "mutation",
24262
+ auth: "admin"
24263
+ }), method(_void(), object({ pem: string() })), method(_void(), TlsStatusSchema, {
24264
+ kind: "mutation",
24265
+ auth: "admin"
24266
+ });
24016
24267
  var LockControlStatusSchema = object({
24017
24268
  /** Lifecycle state of the lock. `jammed` means the motor reported
24018
24269
  * failure to reach the target — operator intervention required. */
@@ -25573,7 +25824,12 @@ var PlateInfoSchema = object({
25573
25824
  plateBbox: BoundingBoxSchema.optional(),
25574
25825
  /** keyFrame parity: MediaStore key of the track's native-resolution key frame. */
25575
25826
  keyFrameMediaKey: string().optional(),
25576
- base64: string().optional()
25827
+ base64: string().optional(),
25828
+ /**
25829
+ * Same crop as a data-plane URL. `getPlateByTrack` returns this and
25830
+ * never inlines JPEG; `listPlates` still inlines for the admin-ui.
25831
+ */
25832
+ cropUrl: string().optional()
25577
25833
  });
25578
25834
  var MediaFileLiteSchema = object({
25579
25835
  key: string(),
@@ -31097,6 +31353,12 @@ Object.freeze({
31097
31353
  addonId: null,
31098
31354
  access: "view"
31099
31355
  },
31356
+ "deviceManager.getBindingsBatch": {
31357
+ capName: "device-manager",
31358
+ capScope: "system",
31359
+ addonId: null,
31360
+ access: "view"
31361
+ },
31100
31362
  "deviceManager.getChildren": {
31101
31363
  capName: "device-manager",
31102
31364
  capScope: "system",
@@ -31157,6 +31419,12 @@ Object.freeze({
31157
31419
  addonId: null,
31158
31420
  access: "view"
31159
31421
  },
31422
+ "deviceManager.getLinkedDevicesBatch": {
31423
+ capName: "device-manager",
31424
+ capScope: "system",
31425
+ addonId: null,
31426
+ access: "view"
31427
+ },
31160
31428
  "deviceManager.getRoleDisplayDefaults": {
31161
31429
  capName: "device-manager",
31162
31430
  capScope: "system",
@@ -32039,6 +32307,12 @@ Object.freeze({
32039
32307
  addonId: null,
32040
32308
  access: "create"
32041
32309
  },
32310
+ "localNetwork.downloadCa": {
32311
+ capName: "local-network",
32312
+ capScope: "system",
32313
+ addonId: null,
32314
+ access: "view"
32315
+ },
32042
32316
  "localNetwork.getAllowedAddresses": {
32043
32317
  capName: "local-network",
32044
32318
  capScope: "system",
@@ -32063,18 +32337,42 @@ Object.freeze({
32063
32337
  addonId: null,
32064
32338
  access: "view"
32065
32339
  },
32340
+ "localNetwork.getTlsStatus": {
32341
+ capName: "local-network",
32342
+ capScope: "system",
32343
+ addonId: null,
32344
+ access: "view"
32345
+ },
32346
+ "localNetwork.getViewerEndpoints": {
32347
+ capName: "local-network",
32348
+ capScope: "system",
32349
+ addonId: null,
32350
+ access: "view"
32351
+ },
32066
32352
  "localNetwork.list": {
32067
32353
  capName: "local-network",
32068
32354
  capScope: "system",
32069
32355
  addonId: null,
32070
32356
  access: "view"
32071
32357
  },
32358
+ "localNetwork.regenerateCertificate": {
32359
+ capName: "local-network",
32360
+ capScope: "system",
32361
+ addonId: null,
32362
+ access: "create"
32363
+ },
32072
32364
  "localNetwork.resetAllowlistToBestMatch": {
32073
32365
  capName: "local-network",
32074
32366
  capScope: "system",
32075
32367
  addonId: null,
32076
32368
  access: "delete"
32077
32369
  },
32370
+ "localNetwork.revertToGeneratedCertificate": {
32371
+ capName: "local-network",
32372
+ capScope: "system",
32373
+ addonId: null,
32374
+ access: "create"
32375
+ },
32078
32376
  "localNetwork.setAllowedAddresses": {
32079
32377
  capName: "local-network",
32080
32378
  capScope: "system",
@@ -32087,6 +32385,18 @@ Object.freeze({
32087
32385
  addonId: null,
32088
32386
  access: "create"
32089
32387
  },
32388
+ "localNetwork.setViewerEndpoints": {
32389
+ capName: "local-network",
32390
+ capScope: "system",
32391
+ addonId: null,
32392
+ access: "create"
32393
+ },
32394
+ "localNetwork.uploadCertificate": {
32395
+ capName: "local-network",
32396
+ capScope: "system",
32397
+ addonId: null,
32398
+ access: "create"
32399
+ },
32090
32400
  "lockControl.lock": {
32091
32401
  capName: "lock-control",
32092
32402
  capScope: "device",
@@ -32885,6 +33195,12 @@ Object.freeze({
32885
33195
  addonId: null,
32886
33196
  access: "view"
32887
33197
  },
33198
+ "pipelineAnalytics.getGroup": {
33199
+ capName: "pipeline-analytics",
33200
+ capScope: "device",
33201
+ addonId: null,
33202
+ access: "view"
33203
+ },
32888
33204
  "pipelineAnalytics.getKeyEvents": {
32889
33205
  capName: "pipeline-analytics",
32890
33206
  capScope: "device",
@@ -32969,6 +33285,12 @@ Object.freeze({
32969
33285
  addonId: null,
32970
33286
  access: "view"
32971
33287
  },
33288
+ "pipelineAnalytics.listGroups": {
33289
+ capName: "pipeline-analytics",
33290
+ capScope: "device",
33291
+ addonId: null,
33292
+ access: "view"
33293
+ },
32972
33294
  "pipelineAnalytics.listOpsLog": {
32973
33295
  capName: "pipeline-analytics",
32974
33296
  capScope: "device",
@@ -34967,6 +35289,12 @@ Object.freeze({
34967
35289
  addonId: null,
34968
35290
  access: "create"
34969
35291
  },
35292
+ "terminalSession.updateInstance": {
35293
+ capName: "terminal-session",
35294
+ capScope: "system",
35295
+ addonId: null,
35296
+ access: "create"
35297
+ },
34970
35298
  "terminalSession.writeInput": {
34971
35299
  capName: "terminal-session",
34972
35300
  capScope: "system",
@@ -35744,6 +36072,11 @@ Object.freeze({
35744
36072
  form: "single",
35745
36073
  optional: false
35746
36074
  }],
36075
+ "deviceManager.getBindingsBatch": [{
36076
+ name: "deviceIds",
36077
+ form: "array",
36078
+ optional: false
36079
+ }],
35747
36080
  "deviceManager.getChildren": [{
35748
36081
  name: "parentDeviceId",
35749
36082
  form: "single",
@@ -35789,6 +36122,11 @@ Object.freeze({
35789
36122
  form: "single",
35790
36123
  optional: false
35791
36124
  }],
36125
+ "deviceManager.getLinkedDevicesBatch": [{
36126
+ name: "deviceIds",
36127
+ form: "array",
36128
+ optional: false
36129
+ }],
35792
36130
  "deviceManager.getSettingsSchema": [{
35793
36131
  name: "deviceId",
35794
36132
  form: "single",
@@ -35809,6 +36147,11 @@ Object.freeze({
35809
36147
  form: "single",
35810
36148
  optional: false
35811
36149
  }],
36150
+ "deviceManager.listAll": [{
36151
+ name: "deviceIds",
36152
+ form: "array",
36153
+ optional: true
36154
+ }],
35812
36155
  "deviceManager.loadConfig": [{
35813
36156
  name: "deviceId",
35814
36157
  form: "single",
@@ -36382,6 +36725,11 @@ Object.freeze({
36382
36725
  form: "single",
36383
36726
  optional: false
36384
36727
  }],
36728
+ "pipelineAnalytics.getGroup": [{
36729
+ name: "deviceId",
36730
+ form: "single",
36731
+ optional: false
36732
+ }],
36385
36733
  "pipelineAnalytics.getKeyEvents": [{
36386
36734
  name: "deviceId",
36387
36735
  form: "single",
@@ -36437,6 +36785,11 @@ Object.freeze({
36437
36785
  form: "array",
36438
36786
  optional: false
36439
36787
  }],
36788
+ "pipelineAnalytics.listGroups": [{
36789
+ name: "deviceIds",
36790
+ form: "array",
36791
+ optional: false
36792
+ }],
36440
36793
  "pipelineAnalytics.listOpsLog": [{
36441
36794
  name: "deviceId",
36442
36795
  form: "single",
@@ -37454,6 +37807,35 @@ Object.freeze(Object.fromEntries([{
37454
37807
  }]
37455
37808
  }].map((s) => [s.stepId, s.defaultModelId])));
37456
37809
  string().min(1);
37810
+ var CLUSTER_STEP_SETTING_FIELDS = [{
37811
+ stepId: "face-embedding",
37812
+ key: "minLandmarkFaceSize",
37813
+ label: "Min face size for recognition (detection px)",
37814
+ 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.",
37815
+ type: "slider",
37816
+ min: 0,
37817
+ max: 64,
37818
+ step: 2,
37819
+ default: 24
37820
+ }];
37821
+ function clusterStepSettingKey(stepId, fieldKey) {
37822
+ return `clusterStepSetting:${stepId}:${fieldKey}`;
37823
+ }
37824
+ var ClusterSettingNumberSchema = number().finite();
37825
+ function readClusterStepSettings(config) {
37826
+ const out = {};
37827
+ for (const field of CLUSTER_STEP_SETTING_FIELDS) {
37828
+ const parsed = ClusterSettingNumberSchema.safeParse(config[clusterStepSettingKey(field.stepId, field.key)]);
37829
+ const value = parsed.success ? parsed.data : field.default;
37830
+ const existing = out[field.stepId] ?? {};
37831
+ out[field.stepId] = {
37832
+ ...existing,
37833
+ [field.key]: value
37834
+ };
37835
+ }
37836
+ return out;
37837
+ }
37838
+ readClusterStepSettings({});
37457
37839
  object({
37458
37840
  /**
37459
37841
  * Fraction of the box's own size added on EACH side before cutting.