@camstack/system 1.2.117 → 1.2.118

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 (58) hide show
  1. package/dist/addon-utils.d.ts +1 -1
  2. package/dist/addon-utils.js +1 -1
  3. package/dist/addon-utils.mjs +1 -1
  4. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  5. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  6. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  7. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  8. package/dist/builtins/alerts/alerts.addon.js +1 -1
  9. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  10. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  11. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  12. package/dist/builtins/console-logging/index.js +1 -1
  13. package/dist/builtins/console-logging/index.mjs +1 -1
  14. package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
  15. package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
  16. package/dist/builtins/device-manager/device-manager.addon.js +2 -2
  17. package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  18. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  19. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  20. package/dist/builtins/hub-forwarder/index.js +1 -1
  21. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  22. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  23. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  24. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  25. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  26. package/dist/builtins/local-network/local-network.addon.d.ts +24 -2
  27. package/dist/builtins/local-network/local-network.addon.js +63 -17
  28. package/dist/builtins/local-network/local-network.addon.mjs +62 -18
  29. package/dist/builtins/loki-logging/index.js +1 -1
  30. package/dist/builtins/loki-logging/index.mjs +1 -1
  31. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  32. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  33. package/dist/builtins/platform-probe/index.js +1 -1
  34. package/dist/builtins/platform-probe/index.mjs +1 -1
  35. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  36. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  37. package/dist/builtins/snapshot/index.js +1 -1
  38. package/dist/builtins/snapshot/index.mjs +1 -1
  39. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  40. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  41. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
  42. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
  43. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  44. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  45. package/dist/builtins/system-config/system-config.addon.js +1 -1
  46. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  47. package/dist/builtins/winston-logging/index.js +1 -1
  48. package/dist/builtins/winston-logging/index.mjs +1 -1
  49. package/dist/{dist-DMEGlqg6.js → dist-C2_1HCpW.js} +133 -15
  50. package/dist/{dist-D4Vmj8iw.mjs → dist-DCTpBXm4.mjs} +133 -15
  51. package/dist/download/model-downloader.d.ts +18 -1
  52. package/dist/{file-data-plane-CuE_hBli.mjs → file-data-plane-BhKdxJgf.mjs} +49 -13
  53. package/dist/{file-data-plane-DUHPHa-Y.js → file-data-plane-DO8KbxCe.js} +49 -13
  54. package/dist/index.js +2 -2
  55. package/dist/index.mjs +2 -2
  56. package/dist/{retired-settings-keys--aM_vGF9.mjs → retired-settings-keys-Czd76yLZ.mjs} +1 -1
  57. package/dist/{retired-settings-keys-DET4YkAU.js → retired-settings-keys-DHRXLMPn.js} +1 -1
  58. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { Gt as EventCategory, yt as BaseAddon } from "../../dist-D4Vmj8iw.mjs";
1
+ import { Gt as EventCategory, yt as BaseAddon } from "../../dist-DCTpBXm4.mjs";
2
2
  //#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
3
3
  /**
4
4
  * Reconcile the durable `enabledProviders` set against authoritative
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-DMEGlqg6.js");
6
+ const require_dist = require("../../dist-C2_1HCpW.js");
7
7
  let zod = require("zod");
8
8
  let node_crypto = require("node:crypto");
9
9
  let _camstack_types_node = require("@camstack/types/node");
@@ -1,4 +1,4 @@
1
- import { Ct as DeviceFeature, Gt as EventCategory, M as deriveBatteryPresence, Rt as nodePin, T as batteryCapability, Tt as DeviceType, i as BatteryStatusSchema, mt as streamQualityLabel, ut as snapshotCapability, vt as errMsg, w as bareAddonId, yt as BaseAddon } from "../../dist-D4Vmj8iw.mjs";
1
+ import { Ct as DeviceFeature, Gt as EventCategory, M as deriveBatteryPresence, Rt as nodePin, T as batteryCapability, Tt as DeviceType, i as BatteryStatusSchema, mt as streamQualityLabel, ut as snapshotCapability, vt as errMsg, w as bareAddonId, yt as BaseAddon } from "../../dist-DCTpBXm4.mjs";
2
2
  import { z } from "zod";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { signExpiringUrl, verifyExpiringUrl } from "@camstack/types/node";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-DMEGlqg6.js");
6
+ const require_dist = require("../../dist-C2_1HCpW.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  let node_fs_promises = require("node:fs/promises");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { V as filesystemBrowseCapability, pt as storageProviderCapability, yt as BaseAddon } from "../../dist-D4Vmj8iw.mjs";
1
+ import { V as filesystemBrowseCapability, pt as storageProviderCapability, yt as BaseAddon } from "../../dist-DCTpBXm4.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { mkdir, readdir, realpath, statfs } from "node:fs/promises";
4
4
  import * as path$1 from "node:path";
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-DMEGlqg6.js");
7
- const require_retired_settings_keys = require("../../retired-settings-keys-DET4YkAU.js");
6
+ const require_dist = require("../../dist-C2_1HCpW.js");
7
+ const require_retired_settings_keys = require("../../retired-settings-keys-DHRXLMPn.js");
8
8
  let node_crypto = require("node:crypto");
9
9
  let node_fs = require("node:fs");
10
10
  let node_module = require("node:module");
@@ -1,5 +1,5 @@
1
- import { A as dataStoreProviderCapability, Bt as parseJsonUnknown, _t as vectorStoreCapability, f as RUNTIME_DEFAULTS, gt as vectorDimFromBase64, j as decodeVectorBase64, kt as asJsonObject, vt as errMsg, w as bareAddonId, yt as BaseAddon } from "../../dist-D4Vmj8iw.mjs";
2
- import { r as retiredKeyStoreOf, t as purgeRetiredSettingsKeys } from "../../retired-settings-keys--aM_vGF9.mjs";
1
+ import { A as dataStoreProviderCapability, Bt as parseJsonUnknown, _t as vectorStoreCapability, f as RUNTIME_DEFAULTS, gt as vectorDimFromBase64, j as decodeVectorBase64, kt as asJsonObject, vt as errMsg, w as bareAddonId, yt as BaseAddon } from "../../dist-DCTpBXm4.mjs";
2
+ import { r as retiredKeyStoreOf, t as purgeRetiredSettingsKeys } from "../../retired-settings-keys-Czd76yLZ.mjs";
3
3
  import { createRequire } from "node:module";
4
4
  import { randomUUID } from "node:crypto";
5
5
  import { statSync } from "node:fs";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-DMEGlqg6.js");
6
+ const require_dist = require("../../dist-C2_1HCpW.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  let node_fs_promises = require("node:fs/promises");
9
9
  node_fs_promises = require_chunk.__toESM(node_fs_promises);
@@ -1,4 +1,4 @@
1
- import { dt as storageCapability, ft as storageMigrationCapability, g as StorageMigrationJobSchema, h as StorageLocationTypeSchema, lt as settingsStoreCapability, yt as BaseAddon, zt as parseJsonObject } from "../../dist-D4Vmj8iw.mjs";
1
+ import { dt as storageCapability, ft as storageMigrationCapability, g as StorageMigrationJobSchema, h as StorageLocationTypeSchema, lt as settingsStoreCapability, yt as BaseAddon, zt as parseJsonObject } from "../../dist-DCTpBXm4.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import * as fs from "node:fs/promises";
4
4
  import * as path$1 from "node:path";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-DMEGlqg6.js");
6
+ const require_dist = require("../../dist-C2_1HCpW.js");
7
7
  //#region src/builtins/system-config/system-config.addon.ts
8
8
  /**
9
9
  * Built-in `system-config` addon — Phase 4 of the settings redesign.
@@ -1,4 +1,4 @@
1
- import { It as hydrateSchema, vt as errMsg, yt as BaseAddon } from "../../dist-D4Vmj8iw.mjs";
1
+ import { It as hydrateSchema, vt as errMsg, yt as BaseAddon } from "../../dist-DCTpBXm4.mjs";
2
2
  //#region src/builtins/system-config/system-config.addon.ts
3
3
  /**
4
4
  * Built-in `system-config` addon — Phase 4 of the settings redesign.
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-DMEGlqg6.js");
6
+ const require_dist = require("../../dist-C2_1HCpW.js");
7
7
  const require_formatter = require("../../formatter-DqAKDlvN.js");
8
8
  let node_path = require("node:path");
9
9
  node_path = require_chunk.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { X as logDestinationCapability, yt as BaseAddon } from "../../dist-D4Vmj8iw.mjs";
1
+ import { X as logDestinationCapability, yt as BaseAddon } from "../../dist-DCTpBXm4.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
3
3
  import * as path$1 from "node:path";
4
4
  import path from "node:path";
@@ -4123,6 +4123,15 @@ var LabelDefinitionSchema = zod.z.object({
4123
4123
  description: zod.z.string().optional(),
4124
4124
  icon: zod.z.string().optional()
4125
4125
  });
4126
+ var ClassMapDefinitionSchema = zod.z.object({
4127
+ mapping: zod.z.record(zod.z.string(), zod.z.enum([
4128
+ "person",
4129
+ "vehicle",
4130
+ "animal",
4131
+ "package"
4132
+ ])),
4133
+ preserveOriginal: zod.z.boolean()
4134
+ });
4126
4135
  var MODEL_FORMATS = [
4127
4136
  "onnx",
4128
4137
  "coreml",
@@ -4301,7 +4310,13 @@ var ModelCatalogEntrySchema = zod.z.object({
4301
4310
  * `id` stays the source of truth for resolution/download/persistence; grouping
4302
4311
  * is a presentation overlay resolved back to an `id`.
4303
4312
  */
4304
- group: ModelVariantGroupSchema.optional()
4313
+ group: ModelVariantGroupSchema.optional(),
4314
+ /**
4315
+ * Per-MODEL class map override. Absent ⇒ the step's `StepDefinition.classMap`
4316
+ * applies (Frigate / COCO public catalog). Set on a custom model whose raw
4317
+ * labels already ARE the CamStack macros (Scrypted identity map).
4318
+ */
4319
+ classMap: ClassMapDefinitionSchema.optional()
4305
4320
  });
4306
4321
  var ConvertTargetSchema = zod.z.discriminatedUnion("format", [zod.z.object({
4307
4322
  format: zod.z.literal("openvino"),
@@ -4330,7 +4345,8 @@ var ModelConvertMetadataSchema = zod.z.object({
4330
4345
  "ocr",
4331
4346
  "segmentation"
4332
4347
  ]),
4333
- faceAlignment: zod.z.boolean().optional()
4348
+ faceAlignment: zod.z.boolean().optional(),
4349
+ classMap: ClassMapDefinitionSchema.optional()
4334
4350
  });
4335
4351
  var ConvertArtifactSchema = zod.z.object({
4336
4352
  format: zod.z.enum(MODEL_FORMATS),
@@ -15925,6 +15941,33 @@ var NativeCropRefSchema = zod.z.object({
15925
15941
  h: zod.z.number()
15926
15942
  })
15927
15943
  });
15944
+ zod.z.object({
15945
+ crop: zod.z.object({
15946
+ left: zod.z.number(),
15947
+ top: zod.z.number(),
15948
+ width: zod.z.number().positive(),
15949
+ height: zod.z.number().positive()
15950
+ }).optional(),
15951
+ content: zod.z.object({
15952
+ width: zod.z.number().int().positive(),
15953
+ height: zod.z.number().int().positive()
15954
+ }),
15955
+ fit: zod.z.enum(["stretch", "contain"]),
15956
+ format: zod.z.enum([
15957
+ "rgb",
15958
+ "gray",
15959
+ "jpeg"
15960
+ ])
15961
+ });
15962
+ var FrameRefSchema = zod.z.object({
15963
+ registryId: zod.z.string().min(1),
15964
+ id: zod.z.string().min(1),
15965
+ width: zod.z.number().int().positive(),
15966
+ height: zod.z.number().int().positive(),
15967
+ format: zod.z.enum(["rgb", "gray"]),
15968
+ timestamp: zod.z.number(),
15969
+ capturedAt: zod.z.number().optional()
15970
+ });
15928
15971
  var ModelFormatSchema$1 = zod.z.enum([
15929
15972
  "onnx",
15930
15973
  "coreml",
@@ -16246,7 +16289,7 @@ var pipelineExecutorCapability = {
16246
16289
  * legacy call shape used by existing benchmark code; once all
16247
16290
  * callers pass it explicitly we make it required.
16248
16291
  *
16249
- * Exactly one of `frame`, `frameHandle`, `imageBase64`,
16292
+ * Exactly one of `frame`, `frameRef`, `frameHandle`, `imageBase64`,
16250
16293
  * `referenceImage` must be provided:
16251
16294
  * - `frame`: runtime dispatch path (runner → decoded broker frame).
16252
16295
  * Carries the raw buffer, dimensions, and format; the executor
@@ -16268,6 +16311,12 @@ var pipelineExecutorCapability = {
16268
16311
  steps: zod.z.array(PipelineStepInputSchema).min(1),
16269
16312
  frame: FrameInputSchema.optional(),
16270
16313
  /**
16314
+ * Process-local lazy frame. Valid only when caller and provider resolve
16315
+ * in the same execution-group process; split/cross-node callers use
16316
+ * `frame`/`image` inline compatibility instead.
16317
+ */
16318
+ frameRef: FrameRefSchema.optional(),
16319
+ /**
16271
16320
  * CB5 shm passthrough — a `FrameHandle` naming the same ring slot
16272
16321
  * the decoded pixels live in. One more member of the one-of
16273
16322
  * frame/frameHandle/image/imageBase64/referenceImage group.
@@ -16617,7 +16666,10 @@ var NativeCropResultSchema = zod.z.object({
16617
16666
  * Which source served this crop, so a quality-sensitive consumer (the native
16618
16667
  * `keyFrame`) can reject a degraded fallback:
16619
16668
  * - `native` — cut from the decode worker's retained NATIVE surface (the
16620
- * quality path).
16669
+ * quality path). A subject-tile serve is also native-resolution and stays
16670
+ * `native` here: the public enum cannot name `tile` without a breaking cap
16671
+ * change. Runner telemetry distinguishes lease vs tile via `source` on the
16672
+ * internal crop result (`nativeHits` vs `tileHits`).
16621
16673
  * - `ram-fullframe` — the native surface MISSED but the request was full-frame,
16622
16674
  * so the ≤640 RAM `RetainedFrameStore` served it (honest lower-res; legit for
16623
16675
  * the blank-frame guard / 640-snapshot resolve, NOT for the clean keyFrame).
@@ -17108,12 +17160,41 @@ var RunnerLocalLoadSchema = zod.z.object({
17108
17160
  * legacy `OrchestratorMetricsSchema` shape so existing dashboards keep
17109
17161
  * working unchanged when they switch to reading from the runner cap.
17110
17162
  */
17163
+ var FrameLazyCountersSchema = zod.z.object({
17164
+ framesDecoded: zod.z.number(),
17165
+ framesAdmitted: zod.z.number(),
17166
+ framesDroppedPixelFree: zod.z.number(),
17167
+ viewsMaterialized: zod.z.number(),
17168
+ viewsSkipped: zod.z.number(),
17169
+ workerToRunnerBytes: zod.z.number(),
17170
+ runnerToPoolRawBytes: zod.z.number(),
17171
+ runnerToPoolJpegBytes: zod.z.number(),
17172
+ onDemandFullFrameRequests: zod.z.number(),
17173
+ onDemandCropRequests: zod.z.number(),
17174
+ nativeHits: zod.z.number(),
17175
+ nativeMisses: zod.z.number(),
17176
+ tileHits: zod.z.number(),
17177
+ tileMisses: zod.z.number(),
17178
+ fallbackHits: zod.z.number(),
17179
+ fallbackMisses: zod.z.number(),
17180
+ retainedWritesAvoided: zod.z.number(),
17181
+ residentRefs: zod.z.number(),
17182
+ residentBytes: zod.z.number(),
17183
+ releases: zod.z.number(),
17184
+ evictions: zod.z.number(),
17185
+ staleMisses: zod.z.number()
17186
+ });
17187
+ var FrameLazyMetricsSchema = zod.z.object({
17188
+ node: FrameLazyCountersSchema,
17189
+ cameras: zod.z.array(FrameLazyCountersSchema.extend({ deviceId: zod.z.number() }))
17190
+ });
17111
17191
  var RunnerLocalMetricsSchema = zod.z.object({
17112
17192
  nodeId: zod.z.string(),
17113
17193
  activeCameras: zod.z.number(),
17114
17194
  throttledCameras: zod.z.number(),
17115
17195
  avgInferenceTimeMs: zod.z.number(),
17116
- queueDepth: zod.z.number()
17196
+ queueDepth: zod.z.number(),
17197
+ frameLazy: FrameLazyMetricsSchema.optional()
17117
17198
  });
17118
17199
  /**
17119
17200
  * Pipeline Runner capability — runtime detection workhorse.
@@ -23947,6 +24028,17 @@ var NotificationEndpointSchema = zod.z.object({
23947
24028
  /** What the ranking currently resolves to (null when nothing is reachable). */
23948
24029
  resolved: zod.z.string().nullable()
23949
24030
  });
24031
+ /**
24032
+ * The URLs the SDK / viewer should race for API access. `baseUrls` empty =
24033
+ * AUTO (every LAN IPv4 + the public tunnel). `resolved` is what that choice
24034
+ * currently expands to, so the UI can show the effective set either way.
24035
+ */
24036
+ var ViewerEndpointsSchema = zod.z.object({
24037
+ /** The operator's explicit race set, or empty for AUTO. */
24038
+ baseUrls: zod.z.array(zod.z.string()).readonly(),
24039
+ /** What the ranking currently resolves to (may be empty if nothing is up). */
24040
+ resolved: zod.z.array(zod.z.string()).readonly()
24041
+ });
23950
24042
  var AllowedAddressesSchema = zod.z.object({
23951
24043
  /**
23952
24044
  * Allowlist of interface addresses operators have explicitly opted
@@ -23988,13 +24080,13 @@ var localNetworkCapability = {
23988
24080
  */
23989
24081
  getPreferred: method(zod.z.void(), PreferredSchema),
23990
24082
  /**
23991
- * Ordered candidate base URLs the SDK should try on connect.
23992
- * Includes LAN IPs (one per non-internal interface), the public
23993
- * tunnel hostname (when active), and loopback as a last-resort
23994
- * fallback. Filterable by `includeLoopback` / `ipv4Only`.
23995
- * Honours `getAllowedAddresses()` when set addresses outside
23996
- * the allowlist are dropped (the public tunnel + loopback are
23997
- * always included as escape hatches).
24083
+ * Ordered candidate base URLs (the palette the Network tab shows).
24084
+ * Includes LAN IPv4, stable LAN IPv6, the public tunnel, and mesh when
24085
+ * joined. Loopback is off by default. The SDK races the subset from
24086
+ * `getViewerEndpoints`, not this full list — IPv6 stays here because
24087
+ * WebRTC ICE gathers dual-stack regardless of the HTTP race. Honours
24088
+ * `getAllowedAddresses()` when set addresses outside the allowlist
24089
+ * are dropped (the public tunnel is still included as an escape hatch).
23998
24090
  *
23999
24091
  * **The port is the hub's, not the caller's** (D62 — a function's fact
24000
24092
  * belongs to whoever already owns it). This method used to take a `port`
@@ -24025,10 +24117,11 @@ var localNetworkCapability = {
24025
24117
  */
24026
24118
  port: zod.z.number().int().min(1).max(65535).optional(),
24027
24119
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
24028
- * candidate. Default `true`. */
24120
+ * candidate. Default `false` — loopback is not a client route. */
24029
24121
  includeLoopback: zod.z.boolean().optional(),
24030
- /** Skip IPv6 entries. Some legacy clients can't parse them.
24031
- * Default `false`. */
24122
+ /** Skip IPv6 entries. Default `false` the palette includes stable
24123
+ * LAN IPv6 (ICE/WebRTC uses dual-stack regardless). Pass `true` to
24124
+ * hide them. The viewer HTTP/WS race is `getViewerEndpoints`. */
24032
24125
  ipv4Only: zod.z.boolean().optional(),
24033
24126
  /** Scheme to emit for LAN/loopback URLs. Default `'http'`.
24034
24127
  * Pass `'https'` when the caller is itself loaded over HTTPS
@@ -24057,6 +24150,19 @@ var localNetworkCapability = {
24057
24150
  */
24058
24151
  setNotificationEndpoint: method(zod.z.object({ baseUrl: zod.z.string().nullable() }), NotificationEndpointSchema, { kind: "mutation" }),
24059
24152
  /**
24153
+ * The endpoints the SDK / viewer races for API access. Empty `baseUrls`
24154
+ * means AUTO: every LAN IPv4 address plus the public tunnel, never IPv6,
24155
+ * never mesh, never loopback. `resolved` is that set (or the operator's
24156
+ * explicit subset) as it stands right now.
24157
+ */
24158
+ getViewerEndpoints: method(zod.z.void(), ViewerEndpointsSchema),
24159
+ /**
24160
+ * Replace the viewer race set. Empty `baseUrls` restores AUTO. Stored
24161
+ * verbatim (not indices) so a temporarily-down tunnel is not silently
24162
+ * dropped from the operator's choice.
24163
+ */
24164
+ setViewerEndpoints: method(zod.z.object({ baseUrls: zod.z.array(zod.z.string()).readonly() }), ViewerEndpointsSchema, { kind: "mutation" }),
24165
+ /**
24060
24166
  * Read the operator's allowlist. Empty = "auto" (no filter). Used
24061
24167
  * by the admin UI's address selector to seed its checkbox state.
24062
24168
  */
@@ -32591,6 +32697,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
32591
32697
  addonId: null,
32592
32698
  access: "view"
32593
32699
  },
32700
+ "localNetwork.getViewerEndpoints": {
32701
+ capName: "local-network",
32702
+ capScope: "system",
32703
+ addonId: null,
32704
+ access: "view"
32705
+ },
32594
32706
  "localNetwork.list": {
32595
32707
  capName: "local-network",
32596
32708
  capScope: "system",
@@ -32627,6 +32739,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
32627
32739
  addonId: null,
32628
32740
  access: "create"
32629
32741
  },
32742
+ "localNetwork.setViewerEndpoints": {
32743
+ capName: "local-network",
32744
+ capScope: "system",
32745
+ addonId: null,
32746
+ access: "create"
32747
+ },
32630
32748
  "localNetwork.uploadCertificate": {
32631
32749
  capName: "local-network",
32632
32750
  capScope: "system",
@@ -4123,6 +4123,15 @@ var LabelDefinitionSchema = z.object({
4123
4123
  description: z.string().optional(),
4124
4124
  icon: z.string().optional()
4125
4125
  });
4126
+ var ClassMapDefinitionSchema = z.object({
4127
+ mapping: z.record(z.string(), z.enum([
4128
+ "person",
4129
+ "vehicle",
4130
+ "animal",
4131
+ "package"
4132
+ ])),
4133
+ preserveOriginal: z.boolean()
4134
+ });
4126
4135
  var MODEL_FORMATS = [
4127
4136
  "onnx",
4128
4137
  "coreml",
@@ -4301,7 +4310,13 @@ var ModelCatalogEntrySchema = z.object({
4301
4310
  * `id` stays the source of truth for resolution/download/persistence; grouping
4302
4311
  * is a presentation overlay resolved back to an `id`.
4303
4312
  */
4304
- group: ModelVariantGroupSchema.optional()
4313
+ group: ModelVariantGroupSchema.optional(),
4314
+ /**
4315
+ * Per-MODEL class map override. Absent ⇒ the step's `StepDefinition.classMap`
4316
+ * applies (Frigate / COCO public catalog). Set on a custom model whose raw
4317
+ * labels already ARE the CamStack macros (Scrypted identity map).
4318
+ */
4319
+ classMap: ClassMapDefinitionSchema.optional()
4305
4320
  });
4306
4321
  var ConvertTargetSchema = z.discriminatedUnion("format", [z.object({
4307
4322
  format: z.literal("openvino"),
@@ -4330,7 +4345,8 @@ var ModelConvertMetadataSchema = z.object({
4330
4345
  "ocr",
4331
4346
  "segmentation"
4332
4347
  ]),
4333
- faceAlignment: z.boolean().optional()
4348
+ faceAlignment: z.boolean().optional(),
4349
+ classMap: ClassMapDefinitionSchema.optional()
4334
4350
  });
4335
4351
  var ConvertArtifactSchema = z.object({
4336
4352
  format: z.enum(MODEL_FORMATS),
@@ -15925,6 +15941,33 @@ var NativeCropRefSchema = z.object({
15925
15941
  h: z.number()
15926
15942
  })
15927
15943
  });
15944
+ z.object({
15945
+ crop: z.object({
15946
+ left: z.number(),
15947
+ top: z.number(),
15948
+ width: z.number().positive(),
15949
+ height: z.number().positive()
15950
+ }).optional(),
15951
+ content: z.object({
15952
+ width: z.number().int().positive(),
15953
+ height: z.number().int().positive()
15954
+ }),
15955
+ fit: z.enum(["stretch", "contain"]),
15956
+ format: z.enum([
15957
+ "rgb",
15958
+ "gray",
15959
+ "jpeg"
15960
+ ])
15961
+ });
15962
+ var FrameRefSchema = z.object({
15963
+ registryId: z.string().min(1),
15964
+ id: z.string().min(1),
15965
+ width: z.number().int().positive(),
15966
+ height: z.number().int().positive(),
15967
+ format: z.enum(["rgb", "gray"]),
15968
+ timestamp: z.number(),
15969
+ capturedAt: z.number().optional()
15970
+ });
15928
15971
  var ModelFormatSchema$1 = z.enum([
15929
15972
  "onnx",
15930
15973
  "coreml",
@@ -16246,7 +16289,7 @@ var pipelineExecutorCapability = {
16246
16289
  * legacy call shape used by existing benchmark code; once all
16247
16290
  * callers pass it explicitly we make it required.
16248
16291
  *
16249
- * Exactly one of `frame`, `frameHandle`, `imageBase64`,
16292
+ * Exactly one of `frame`, `frameRef`, `frameHandle`, `imageBase64`,
16250
16293
  * `referenceImage` must be provided:
16251
16294
  * - `frame`: runtime dispatch path (runner → decoded broker frame).
16252
16295
  * Carries the raw buffer, dimensions, and format; the executor
@@ -16268,6 +16311,12 @@ var pipelineExecutorCapability = {
16268
16311
  steps: z.array(PipelineStepInputSchema).min(1),
16269
16312
  frame: FrameInputSchema.optional(),
16270
16313
  /**
16314
+ * Process-local lazy frame. Valid only when caller and provider resolve
16315
+ * in the same execution-group process; split/cross-node callers use
16316
+ * `frame`/`image` inline compatibility instead.
16317
+ */
16318
+ frameRef: FrameRefSchema.optional(),
16319
+ /**
16271
16320
  * CB5 shm passthrough — a `FrameHandle` naming the same ring slot
16272
16321
  * the decoded pixels live in. One more member of the one-of
16273
16322
  * frame/frameHandle/image/imageBase64/referenceImage group.
@@ -16617,7 +16666,10 @@ var NativeCropResultSchema = z.object({
16617
16666
  * Which source served this crop, so a quality-sensitive consumer (the native
16618
16667
  * `keyFrame`) can reject a degraded fallback:
16619
16668
  * - `native` — cut from the decode worker's retained NATIVE surface (the
16620
- * quality path).
16669
+ * quality path). A subject-tile serve is also native-resolution and stays
16670
+ * `native` here: the public enum cannot name `tile` without a breaking cap
16671
+ * change. Runner telemetry distinguishes lease vs tile via `source` on the
16672
+ * internal crop result (`nativeHits` vs `tileHits`).
16621
16673
  * - `ram-fullframe` — the native surface MISSED but the request was full-frame,
16622
16674
  * so the ≤640 RAM `RetainedFrameStore` served it (honest lower-res; legit for
16623
16675
  * the blank-frame guard / 640-snapshot resolve, NOT for the clean keyFrame).
@@ -17108,12 +17160,41 @@ var RunnerLocalLoadSchema = z.object({
17108
17160
  * legacy `OrchestratorMetricsSchema` shape so existing dashboards keep
17109
17161
  * working unchanged when they switch to reading from the runner cap.
17110
17162
  */
17163
+ var FrameLazyCountersSchema = z.object({
17164
+ framesDecoded: z.number(),
17165
+ framesAdmitted: z.number(),
17166
+ framesDroppedPixelFree: z.number(),
17167
+ viewsMaterialized: z.number(),
17168
+ viewsSkipped: z.number(),
17169
+ workerToRunnerBytes: z.number(),
17170
+ runnerToPoolRawBytes: z.number(),
17171
+ runnerToPoolJpegBytes: z.number(),
17172
+ onDemandFullFrameRequests: z.number(),
17173
+ onDemandCropRequests: z.number(),
17174
+ nativeHits: z.number(),
17175
+ nativeMisses: z.number(),
17176
+ tileHits: z.number(),
17177
+ tileMisses: z.number(),
17178
+ fallbackHits: z.number(),
17179
+ fallbackMisses: z.number(),
17180
+ retainedWritesAvoided: z.number(),
17181
+ residentRefs: z.number(),
17182
+ residentBytes: z.number(),
17183
+ releases: z.number(),
17184
+ evictions: z.number(),
17185
+ staleMisses: z.number()
17186
+ });
17187
+ var FrameLazyMetricsSchema = z.object({
17188
+ node: FrameLazyCountersSchema,
17189
+ cameras: z.array(FrameLazyCountersSchema.extend({ deviceId: z.number() }))
17190
+ });
17111
17191
  var RunnerLocalMetricsSchema = z.object({
17112
17192
  nodeId: z.string(),
17113
17193
  activeCameras: z.number(),
17114
17194
  throttledCameras: z.number(),
17115
17195
  avgInferenceTimeMs: z.number(),
17116
- queueDepth: z.number()
17196
+ queueDepth: z.number(),
17197
+ frameLazy: FrameLazyMetricsSchema.optional()
17117
17198
  });
17118
17199
  /**
17119
17200
  * Pipeline Runner capability — runtime detection workhorse.
@@ -23947,6 +24028,17 @@ var NotificationEndpointSchema = z.object({
23947
24028
  /** What the ranking currently resolves to (null when nothing is reachable). */
23948
24029
  resolved: z.string().nullable()
23949
24030
  });
24031
+ /**
24032
+ * The URLs the SDK / viewer should race for API access. `baseUrls` empty =
24033
+ * AUTO (every LAN IPv4 + the public tunnel). `resolved` is what that choice
24034
+ * currently expands to, so the UI can show the effective set either way.
24035
+ */
24036
+ var ViewerEndpointsSchema = z.object({
24037
+ /** The operator's explicit race set, or empty for AUTO. */
24038
+ baseUrls: z.array(z.string()).readonly(),
24039
+ /** What the ranking currently resolves to (may be empty if nothing is up). */
24040
+ resolved: z.array(z.string()).readonly()
24041
+ });
23950
24042
  var AllowedAddressesSchema = z.object({
23951
24043
  /**
23952
24044
  * Allowlist of interface addresses operators have explicitly opted
@@ -23988,13 +24080,13 @@ var localNetworkCapability = {
23988
24080
  */
23989
24081
  getPreferred: method(z.void(), PreferredSchema),
23990
24082
  /**
23991
- * Ordered candidate base URLs the SDK should try on connect.
23992
- * Includes LAN IPs (one per non-internal interface), the public
23993
- * tunnel hostname (when active), and loopback as a last-resort
23994
- * fallback. Filterable by `includeLoopback` / `ipv4Only`.
23995
- * Honours `getAllowedAddresses()` when set addresses outside
23996
- * the allowlist are dropped (the public tunnel + loopback are
23997
- * always included as escape hatches).
24083
+ * Ordered candidate base URLs (the palette the Network tab shows).
24084
+ * Includes LAN IPv4, stable LAN IPv6, the public tunnel, and mesh when
24085
+ * joined. Loopback is off by default. The SDK races the subset from
24086
+ * `getViewerEndpoints`, not this full list — IPv6 stays here because
24087
+ * WebRTC ICE gathers dual-stack regardless of the HTTP race. Honours
24088
+ * `getAllowedAddresses()` when set addresses outside the allowlist
24089
+ * are dropped (the public tunnel is still included as an escape hatch).
23998
24090
  *
23999
24091
  * **The port is the hub's, not the caller's** (D62 — a function's fact
24000
24092
  * belongs to whoever already owns it). This method used to take a `port`
@@ -24025,10 +24117,11 @@ var localNetworkCapability = {
24025
24117
  */
24026
24118
  port: z.number().int().min(1).max(65535).optional(),
24027
24119
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
24028
- * candidate. Default `true`. */
24120
+ * candidate. Default `false` — loopback is not a client route. */
24029
24121
  includeLoopback: z.boolean().optional(),
24030
- /** Skip IPv6 entries. Some legacy clients can't parse them.
24031
- * Default `false`. */
24122
+ /** Skip IPv6 entries. Default `false` the palette includes stable
24123
+ * LAN IPv6 (ICE/WebRTC uses dual-stack regardless). Pass `true` to
24124
+ * hide them. The viewer HTTP/WS race is `getViewerEndpoints`. */
24032
24125
  ipv4Only: z.boolean().optional(),
24033
24126
  /** Scheme to emit for LAN/loopback URLs. Default `'http'`.
24034
24127
  * Pass `'https'` when the caller is itself loaded over HTTPS
@@ -24057,6 +24150,19 @@ var localNetworkCapability = {
24057
24150
  */
24058
24151
  setNotificationEndpoint: method(z.object({ baseUrl: z.string().nullable() }), NotificationEndpointSchema, { kind: "mutation" }),
24059
24152
  /**
24153
+ * The endpoints the SDK / viewer races for API access. Empty `baseUrls`
24154
+ * means AUTO: every LAN IPv4 address plus the public tunnel, never IPv6,
24155
+ * never mesh, never loopback. `resolved` is that set (or the operator's
24156
+ * explicit subset) as it stands right now.
24157
+ */
24158
+ getViewerEndpoints: method(z.void(), ViewerEndpointsSchema),
24159
+ /**
24160
+ * Replace the viewer race set. Empty `baseUrls` restores AUTO. Stored
24161
+ * verbatim (not indices) so a temporarily-down tunnel is not silently
24162
+ * dropped from the operator's choice.
24163
+ */
24164
+ setViewerEndpoints: method(z.object({ baseUrls: z.array(z.string()).readonly() }), ViewerEndpointsSchema, { kind: "mutation" }),
24165
+ /**
24060
24166
  * Read the operator's allowlist. Empty = "auto" (no filter). Used
24061
24167
  * by the admin UI's address selector to seed its checkbox state.
24062
24168
  */
@@ -32591,6 +32697,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
32591
32697
  addonId: null,
32592
32698
  access: "view"
32593
32699
  },
32700
+ "localNetwork.getViewerEndpoints": {
32701
+ capName: "local-network",
32702
+ capScope: "system",
32703
+ addonId: null,
32704
+ access: "view"
32705
+ },
32594
32706
  "localNetwork.list": {
32595
32707
  capName: "local-network",
32596
32708
  capScope: "system",
@@ -32627,6 +32739,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
32627
32739
  addonId: null,
32628
32740
  access: "create"
32629
32741
  },
32742
+ "localNetwork.setViewerEndpoints": {
32743
+ capName: "local-network",
32744
+ capScope: "system",
32745
+ addonId: null,
32746
+ access: "create"
32747
+ },
32630
32748
  "localNetwork.uploadCertificate": {
32631
32749
  capName: "local-network",
32632
32750
  capScope: "system",
@@ -23,13 +23,30 @@ export declare function siblingUrl(mainUrl: string, sibling: string): string;
23
23
  * agree on the on-disk layout without re-deriving it.
24
24
  */
25
25
  export declare function collectModelFiles(entry: ModelCatalogEntry, format: ModelFormat): string[];
26
+ export type DownloadRedirectPolicy = (url: URL, hop: number) => void;
27
+ export interface DownloadFileOptions {
28
+ readonly onProgress?: (downloaded: number, total: number) => void;
29
+ /**
30
+ * When set, redirects are followed manually and THIS policy is applied to
31
+ * the initial URL and every Location hop before the next fetch. Absent ⇒
32
+ * native `redirect: 'follow'` (backward compatible).
33
+ */
34
+ readonly redirectPolicy?: DownloadRedirectPolicy;
35
+ readonly maxRedirects?: number;
36
+ readonly timeoutMs?: number;
37
+ readonly maxBytes?: number;
38
+ readonly fetchImpl?: typeof fetch;
39
+ }
26
40
  /**
27
41
  * Download a single file from a URL to a destination path.
28
- * Uses native fetch() (Node 22+) which handles redirects natively.
29
42
  * Streams to disk with optional progress callback.
30
43
  * Returns the destination path. Skips download if file already exists.
44
+ *
45
+ * The third argument remains a progress callback for existing callers. Pass
46
+ * an options object to supply a per-hop redirect policy, timeout, or byte cap.
31
47
  */
32
48
  export declare function downloadFile(url: string, destPath: string, onProgress?: (downloaded: number, total: number) => void): Promise<string>;
49
+ export declare function downloadFile(url: string, destPath: string, options: DownloadFileOptions): Promise<string>;
33
50
  /**
34
51
  * Fetch JSON from a URL using native fetch().
35
52
  */