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