@camstack/types 1.2.75 → 1.2.77

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 (48) hide show
  1. package/dist/addon.d.ts +19 -18
  2. package/dist/addon.js +59 -56
  3. package/dist/addon.mjs +59 -57
  4. package/dist/capabilities/alerts.cap.d.ts +5 -5
  5. package/dist/capabilities/battery.cap.d.ts +8 -4
  6. package/dist/capabilities/custom-model-registry.cap.d.ts +4 -4
  7. package/dist/capabilities/decoder.cap.d.ts +2 -2
  8. package/dist/capabilities/face-gallery.cap.d.ts +1 -1
  9. package/dist/capabilities/index.d.ts +3 -3
  10. package/dist/capabilities/lawn-mower-control.cap.d.ts +4 -4
  11. package/dist/capabilities/llm-runtime.cap.d.ts +121 -3
  12. package/dist/capabilities/llm.cap.d.ts +189 -4
  13. package/dist/capabilities/metrics-provider.cap.d.ts +2 -2
  14. package/dist/capabilities/model-convert.cap.d.ts +6 -6
  15. package/dist/capabilities/model-distributor.cap.d.ts +4 -4
  16. package/dist/capabilities/notification-output.cap.d.ts +9 -9
  17. package/dist/capabilities/notification-rules.cap.d.ts +11 -11
  18. package/dist/capabilities/oauth-integration.cap.d.ts +2 -2
  19. package/dist/capabilities/osd-manager.cap.d.ts +6 -6
  20. package/dist/capabilities/pipeline-analytics.cap.d.ts +39 -39
  21. package/dist/capabilities/pipeline-executor.cap.d.ts +7 -7
  22. package/dist/capabilities/pipeline-orchestrator.cap.d.ts +6 -6
  23. package/dist/capabilities/pipeline-runner.cap.d.ts +2 -0
  24. package/dist/capabilities/platform-probe.cap.d.ts +2 -2
  25. package/dist/capabilities/recording.cap.d.ts +3 -3
  26. package/dist/capabilities/sso-bridge.cap.d.ts +3 -3
  27. package/dist/capabilities/stream-broker.cap.d.ts +6 -6
  28. package/dist/capabilities/stream-catalog.cap.d.ts +93 -0
  29. package/dist/capabilities/user-management.cap.d.ts +20 -20
  30. package/dist/device/base-device-provider.d.ts +9 -0
  31. package/dist/device/battery-presence.d.ts +84 -0
  32. package/dist/encode-profile.d.ts +2 -2
  33. package/dist/generated/addon-api.d.ts +15 -8
  34. package/dist/generated/device-local-state.d.ts +3 -0
  35. package/dist/generated/device-proxy.d.ts +1 -0
  36. package/dist/generated/method-access-map.d.ts +1 -1
  37. package/dist/generated/runtime-state-durability.d.ts +1 -1
  38. package/dist/generated/system-proxy.d.ts +1 -1
  39. package/dist/index.d.ts +3 -0
  40. package/dist/index.js +309 -9
  41. package/dist/index.mjs +303 -10
  42. package/dist/interfaces/recording-config.d.ts +2 -2
  43. package/dist/interfaces/stream-broker.d.ts +9 -1
  44. package/dist/{sleep-B-mRsuDp.js → sleep-CoL-9qhR.js} +43 -0
  45. package/dist/{sleep-CQayd2Su.mjs → sleep-DlC2kJYf.mjs} +38 -1
  46. package/dist/types/models.d.ts +7 -7
  47. package/dist/util/boot-recovery-backoff.d.ts +26 -0
  48. package/package.json +1 -1
@@ -28,8 +28,8 @@ export declare const DecoderSessionConfigSchema: z.ZodObject<{
28
28
  deviceId: z.ZodOptional<z.ZodNumber>;
29
29
  tag: z.ZodOptional<z.ZodString>;
30
30
  frameSink: z.ZodDefault<z.ZodEnum<{
31
- shm: "shm";
32
31
  callback: "callback";
32
+ shm: "shm";
33
33
  }>>;
34
34
  debug: z.ZodOptional<z.ZodBoolean>;
35
35
  }, z.core.$strip>;
@@ -401,6 +401,14 @@ export interface CameraDetectionConfig {
401
401
  * Absent ⇒ the orchestrator's built-in default; `0` disables the hold.
402
402
  */
403
403
  readonly maxSessionHoldMs?: number;
404
+ /**
405
+ * Orchestrator quiet period (ms) closing an `audioMode: 'on-motion'` audio
406
+ * window, measured from the last motion event. Required because
407
+ * camera-native motion is a RISING EDGE ONLY — a window closing solely on
408
+ * `detected:false` never closes on an onboard-only camera. Absent ⇒ the
409
+ * orchestrator's built-in default.
410
+ */
411
+ readonly audioMotionWindowMs?: number;
404
412
  readonly audioStreamId?: string;
405
413
  /**
406
414
  * Operator-facing scheduling modes. Forwarded to `RunnerCameraConfig`;
@@ -2920,6 +2920,7 @@ function createDeviceProxy(api, binding, opts) {
2920
2920
  sceneMonitor: createSliceHandle(stateSource, binding.deviceId, "scene-monitor"),
2921
2921
  scriptRunner: createSliceHandle(stateSource, binding.deviceId, "script-runner"),
2922
2922
  smoke: createSliceHandle(stateSource, binding.deviceId, "smoke"),
2923
+ streamCatalog: createSliceHandle(stateSource, binding.deviceId, "stream-catalog"),
2923
2924
  streamParams: createSliceHandle(stateSource, binding.deviceId, "stream-params"),
2924
2925
  switch: createSliceHandle(stateSource, binding.deviceId, "switch"),
2925
2926
  tamper: createSliceHandle(stateSource, binding.deviceId, "tamper"),
@@ -3626,6 +3627,42 @@ function isDeviceScopedCap(capName) {
3626
3627
  return DEVICE_SCOPED_CAPS.has(capName);
3627
3628
  }
3628
3629
  //#endregion
3630
+ //#region src/util/boot-recovery-backoff.ts
3631
+ /**
3632
+ * The ONE retry schedule for work that can fail simply because the node was
3633
+ * still booting.
3634
+ *
3635
+ * The measured failure (docs/design/boot-to-usable-camera.md, item E): a hub
3636
+ * boot that serialised its addon graph starved every driver dial on it. Fifteen
3637
+ * Hikvision devices logged `Initial probe did not complete — scheduling retry
3638
+ * chain {firstRetryMs=300000}` and then sat unprobed for five minutes, long
3639
+ * after the condition that caused the failure had gone. The Tailscale addon's
3640
+ * auto-rejoin carried a byte-identical schedule, armed from `initialize()`, for
3641
+ * the same reason.
3642
+ *
3643
+ * The shape that fixes it: **two cheap attempts first, then the long tail.**
3644
+ *
3645
+ * - 15 s / 60 s — the boot window. Anything that failed because the node was
3646
+ * busy is recovered here, before an operator can open the UI and see a
3647
+ * camera that is wrong about itself.
3648
+ * - 5 m → 90 m — the genuinely-offline case. A battery cam that is asleep, a
3649
+ * VLAN that is down, a peer that has not come back. Unchanged in intent from
3650
+ * the schedule this replaces (~3 h 30 m of coverage): here ~3 h 21 m, then
3651
+ * the chain ends and manual re-arm (reprobe / restart) is the only path.
3652
+ *
3653
+ * Bounded on purpose — see D6. A chain that never gives up is a busy loop with
3654
+ * extra steps.
3655
+ */
3656
+ var BOOT_RECOVERY_BACKOFF_MS = [
3657
+ 15e3,
3658
+ 6e4,
3659
+ 5 * 6e4,
3660
+ 15 * 6e4,
3661
+ 30 * 6e4,
3662
+ 60 * 6e4,
3663
+ 90 * 6e4
3664
+ ];
3665
+ //#endregion
3629
3666
  //#region src/utils/json-safe.ts
3630
3667
  /**
3631
3668
  * Type-safe JSON parsing helpers.
@@ -3739,6 +3776,12 @@ function sleepCancellable(ms, signal) {
3739
3776
  });
3740
3777
  }
3741
3778
  //#endregion
3779
+ Object.defineProperty(exports, "BOOT_RECOVERY_BACKOFF_MS", {
3780
+ enumerable: true,
3781
+ get: function() {
3782
+ return BOOT_RECOVERY_BACKOFF_MS;
3783
+ }
3784
+ });
3742
3785
  Object.defineProperty(exports, "BaseAddon", {
3743
3786
  enumerable: true,
3744
3787
  get: function() {
@@ -2920,6 +2920,7 @@ function createDeviceProxy(api, binding, opts) {
2920
2920
  sceneMonitor: createSliceHandle(stateSource, binding.deviceId, "scene-monitor"),
2921
2921
  scriptRunner: createSliceHandle(stateSource, binding.deviceId, "script-runner"),
2922
2922
  smoke: createSliceHandle(stateSource, binding.deviceId, "smoke"),
2923
+ streamCatalog: createSliceHandle(stateSource, binding.deviceId, "stream-catalog"),
2923
2924
  streamParams: createSliceHandle(stateSource, binding.deviceId, "stream-params"),
2924
2925
  switch: createSliceHandle(stateSource, binding.deviceId, "switch"),
2925
2926
  tamper: createSliceHandle(stateSource, binding.deviceId, "tamper"),
@@ -3626,6 +3627,42 @@ function isDeviceScopedCap(capName) {
3626
3627
  return DEVICE_SCOPED_CAPS.has(capName);
3627
3628
  }
3628
3629
  //#endregion
3630
+ //#region src/util/boot-recovery-backoff.ts
3631
+ /**
3632
+ * The ONE retry schedule for work that can fail simply because the node was
3633
+ * still booting.
3634
+ *
3635
+ * The measured failure (docs/design/boot-to-usable-camera.md, item E): a hub
3636
+ * boot that serialised its addon graph starved every driver dial on it. Fifteen
3637
+ * Hikvision devices logged `Initial probe did not complete — scheduling retry
3638
+ * chain {firstRetryMs=300000}` and then sat unprobed for five minutes, long
3639
+ * after the condition that caused the failure had gone. The Tailscale addon's
3640
+ * auto-rejoin carried a byte-identical schedule, armed from `initialize()`, for
3641
+ * the same reason.
3642
+ *
3643
+ * The shape that fixes it: **two cheap attempts first, then the long tail.**
3644
+ *
3645
+ * - 15 s / 60 s — the boot window. Anything that failed because the node was
3646
+ * busy is recovered here, before an operator can open the UI and see a
3647
+ * camera that is wrong about itself.
3648
+ * - 5 m → 90 m — the genuinely-offline case. A battery cam that is asleep, a
3649
+ * VLAN that is down, a peer that has not come back. Unchanged in intent from
3650
+ * the schedule this replaces (~3 h 30 m of coverage): here ~3 h 21 m, then
3651
+ * the chain ends and manual re-arm (reprobe / restart) is the only path.
3652
+ *
3653
+ * Bounded on purpose — see D6. A chain that never gives up is a busy loop with
3654
+ * extra steps.
3655
+ */
3656
+ var BOOT_RECOVERY_BACKOFF_MS = [
3657
+ 15e3,
3658
+ 6e4,
3659
+ 5 * 6e4,
3660
+ 15 * 6e4,
3661
+ 30 * 6e4,
3662
+ 60 * 6e4,
3663
+ 90 * 6e4
3664
+ ];
3665
+ //#endregion
3629
3666
  //#region src/utils/json-safe.ts
3630
3667
  /**
3631
3668
  * Type-safe JSON parsing helpers.
@@ -3739,4 +3776,4 @@ function sleepCancellable(ms, signal) {
3739
3776
  });
3740
3777
  }
3741
3778
  //#endregion
3742
- export { FrameHandleFormatSchema as $, isDeviceConfigCap as A, emitDownForOwnedCaps as B, DeviceType as C, WELL_KNOWN_TAB_MAP as Ct, DEVICE_STATUS_METHOD as D, resolveHydratedFieldValue as Dt, DEVICE_SETTINGS_CONTRIBUTION_METHODS as E, hydrateSchema as Et, nodePin as F, CAM_PROFILE_ORDER as G, scopeKey as H, readNodePin as I, CamStreamResolutionSchema as J, CamProfileSchema as K, toNodeId as L, resolveCapMount as M, systemMethod as N, event as O, CAP_NODE_PIN_CONTEXT_KEY as P, EncodedPacketSchema as Q, ReadinessRegistry as R, DeviceRole as S, WELL_KNOWN_TABS as St, DEFAULT_RUNTIME_STATE_DURABILITY as T, collectHydratedFieldValues as Tt, BrokerStatsSchema as U, readinessKey as V, BrokerStatusSchema as W, DecodedAudioChunkSchema as X, CameraStreamSchema as Y, DecodedFrameSchema as Z, RawStateResultSchema as _, normalizeAddonInitResult as _t, asJsonObject as a, StreamSourceSchema as at, ChargingStatus as b, emitReadiness as bt, parseJsonArray as c, SubscribeFramesInputSchema as ct, DEVICE_SCOPED_CAPS as d, makeSourceBrokerId as dt, FrameHandleSchema as et, isDeviceScopedCap as f, parseProfileBrokerId as ft, createSliceHandle as g, BaseAddon as gt, createMirrorSource as h, DisposerChain as ht, asJsonArray as i, StreamSourceEntrySchema$1 as it, method as j, expandCapMethods as k, parseJsonObject as l, SubscribeFramesResultSchema as lt, createLazyTrpcSource as m, DATAPLANE_SECRET_HEADER as mt, sleepCancellable as n, ProfileSlotSchema as nt, asNumber as o, SubscribeAudioChunksInputSchema as ot, createDeviceProxy as p, selectAssignedProfileSlots as pt, CamStreamKindSchema as q, asBoolean as r, ProfileSlotStatusSchema as rt, asString as s, SubscribeAudioChunksResultSchema as st, sleep as t, ProfileRtspEntrySchema as tt, parseJsonUnknown as u, makeProfileBrokerId as ut, deviceOpsCapability as v, createDurableState as vt, adminUiCapability as w, collectHydratedFieldEntries as wt, DeviceFeature as x, isEvent as xt, viewerUiCapability as y, createEvent as yt, ReadinessTimeoutError as z };
3779
+ export { EncodedPacketSchema as $, expandCapMethods as A, ReadinessTimeoutError as B, DeviceRole as C, WELL_KNOWN_TABS as Ct, DEVICE_SETTINGS_CONTRIBUTION_METHODS as D, hydrateSchema as Dt, DEFAULT_RUNTIME_STATE_DURABILITY as E, collectHydratedFieldValues as Et, CAP_NODE_PIN_CONTEXT_KEY as F, BrokerStatusSchema as G, readinessKey as H, nodePin as I, CamStreamKindSchema as J, CAM_PROFILE_ORDER as K, readNodePin as L, method as M, resolveCapMount as N, DEVICE_STATUS_METHOD as O, resolveHydratedFieldValue as Ot, systemMethod as P, DecodedFrameSchema as Q, toNodeId as R, DeviceFeature as S, isEvent as St, adminUiCapability as T, collectHydratedFieldEntries as Tt, scopeKey as U, emitDownForOwnedCaps as V, BrokerStatsSchema as W, CameraStreamSchema as X, CamStreamResolutionSchema as Y, DecodedAudioChunkSchema as Z, createSliceHandle as _, BaseAddon as _t, asJsonObject as a, StreamSourceEntrySchema$1 as at, viewerUiCapability as b, createEvent as bt, parseJsonArray as c, SubscribeAudioChunksResultSchema as ct, BOOT_RECOVERY_BACKOFF_MS as d, makeProfileBrokerId as dt, FrameHandleFormatSchema as et, DEVICE_SCOPED_CAPS as f, makeSourceBrokerId as ft, createMirrorSource as g, DisposerChain as gt, createLazyTrpcSource as h, DATAPLANE_SECRET_HEADER as ht, asJsonArray as i, ProfileSlotStatusSchema as it, isDeviceConfigCap as j, event as k, parseJsonObject as l, SubscribeFramesInputSchema as lt, createDeviceProxy as m, selectAssignedProfileSlots as mt, sleepCancellable as n, ProfileRtspEntrySchema as nt, asNumber as o, StreamSourceSchema as ot, isDeviceScopedCap as p, parseProfileBrokerId as pt, CamProfileSchema as q, asBoolean as r, ProfileSlotSchema as rt, asString as s, SubscribeAudioChunksInputSchema as st, sleep as t, FrameHandleSchema as tt, parseJsonUnknown as u, SubscribeFramesResultSchema as ut, RawStateResultSchema as v, normalizeAddonInitResult as vt, DeviceType as w, WELL_KNOWN_TAB_MAP as wt, ChargingStatus as x, emitReadiness as xt, deviceOpsCapability as y, createDurableState as yt, ReadinessRegistry as z };
@@ -121,8 +121,8 @@ export declare const ModelVariantGroupSchema: z.ZodObject<{
121
121
  int8: "int8";
122
122
  }>>;
123
123
  optimization: z.ZodOptional<z.ZodEnum<{
124
- standard: "standard";
125
124
  fast: "fast";
125
+ standard: "standard";
126
126
  }>>;
127
127
  resolution: z.ZodOptional<z.ZodNumber>;
128
128
  }, z.core.$strip>;
@@ -210,9 +210,9 @@ export declare const ModelCatalogEntrySchema: z.ZodObject<{
210
210
  nhwc: "nhwc";
211
211
  }>>;
212
212
  inputNormalization: z.ZodOptional<z.ZodEnum<{
213
+ none: "none";
213
214
  "zero-one": "zero-one";
214
215
  imagenet: "imagenet";
215
- none: "none";
216
216
  }>>;
217
217
  outputProbabilities: z.ZodOptional<z.ZodBoolean>;
218
218
  preprocessMode: z.ZodOptional<z.ZodEnum<{
@@ -240,8 +240,8 @@ export declare const ModelCatalogEntrySchema: z.ZodObject<{
240
240
  int8: "int8";
241
241
  }>>;
242
242
  optimization: z.ZodOptional<z.ZodEnum<{
243
- standard: "standard";
244
243
  fast: "fast";
244
+ standard: "standard";
245
245
  }>>;
246
246
  resolution: z.ZodOptional<z.ZodNumber>;
247
247
  }, z.core.$strip>>;
@@ -310,19 +310,19 @@ export declare const ModelConvertMetadataSchema: z.ZodObject<{
310
310
  nhwc: "nhwc";
311
311
  }>>;
312
312
  inputNormalization: z.ZodOptional<z.ZodEnum<{
313
+ none: "none";
313
314
  "zero-one": "zero-one";
314
315
  imagenet: "imagenet";
315
- none: "none";
316
316
  }>>;
317
317
  preprocessMode: z.ZodOptional<z.ZodEnum<{
318
318
  letterbox: "letterbox";
319
319
  resize: "resize";
320
320
  }>>;
321
321
  outputFormat: z.ZodEnum<{
322
+ classification: "classification";
322
323
  yolo: "yolo";
323
324
  ssd: "ssd";
324
325
  embedding: "embedding";
325
- classification: "classification";
326
326
  ocr: "ocr";
327
327
  segmentation: "segmentation";
328
328
  }>;
@@ -431,9 +431,9 @@ export declare const ConvertResultSchema: z.ZodObject<{
431
431
  nhwc: "nhwc";
432
432
  }>>;
433
433
  inputNormalization: z.ZodOptional<z.ZodEnum<{
434
+ none: "none";
434
435
  "zero-one": "zero-one";
435
436
  imagenet: "imagenet";
436
- none: "none";
437
437
  }>>;
438
438
  outputProbabilities: z.ZodOptional<z.ZodBoolean>;
439
439
  preprocessMode: z.ZodOptional<z.ZodEnum<{
@@ -461,8 +461,8 @@ export declare const ConvertResultSchema: z.ZodObject<{
461
461
  int8: "int8";
462
462
  }>>;
463
463
  optimization: z.ZodOptional<z.ZodEnum<{
464
- standard: "standard";
465
464
  fast: "fast";
465
+ standard: "standard";
466
466
  }>>;
467
467
  resolution: z.ZodOptional<z.ZodNumber>;
468
468
  }, z.core.$strip>>;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * The ONE retry schedule for work that can fail simply because the node was
3
+ * still booting.
4
+ *
5
+ * The measured failure (docs/design/boot-to-usable-camera.md, item E): a hub
6
+ * boot that serialised its addon graph starved every driver dial on it. Fifteen
7
+ * Hikvision devices logged `Initial probe did not complete — scheduling retry
8
+ * chain {firstRetryMs=300000}` and then sat unprobed for five minutes, long
9
+ * after the condition that caused the failure had gone. The Tailscale addon's
10
+ * auto-rejoin carried a byte-identical schedule, armed from `initialize()`, for
11
+ * the same reason.
12
+ *
13
+ * The shape that fixes it: **two cheap attempts first, then the long tail.**
14
+ *
15
+ * - 15 s / 60 s — the boot window. Anything that failed because the node was
16
+ * busy is recovered here, before an operator can open the UI and see a
17
+ * camera that is wrong about itself.
18
+ * - 5 m → 90 m — the genuinely-offline case. A battery cam that is asleep, a
19
+ * VLAN that is down, a peer that has not come back. Unchanged in intent from
20
+ * the schedule this replaces (~3 h 30 m of coverage): here ~3 h 21 m, then
21
+ * the chain ends and manual re-arm (reprobe / restart) is the only path.
22
+ *
23
+ * Bounded on purpose — see D6. A chain that never gives up is a busy loop with
24
+ * extra steps.
25
+ */
26
+ export declare const BOOT_RECOVERY_BACKOFF_MS: readonly number[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.75",
3
+ "version": "1.2.77",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",