@camstack/addon-pipeline-orchestrator 1.2.678 → 1.2.680

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 (23) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/assets/viewer/.viewer-current-files.json +7 -7
  3. package/assets/viewer/.viewer-version +1 -1
  4. package/assets/viewer/_expo/static/js/web/{__common-5b85841d4b20f62da7b2fcdd19153836.js → __common-4b0e8e7d1610c7eb9d241a1dd8277efa.js} +3 -3
  5. package/assets/viewer/_expo/static/js/web/{index-7235749a43354ff5e4efd45a599be105.js → index-b82e54d11b06c09ac899aac34aed27a7.js} +1 -1
  6. package/assets/viewer/embed/assets/{MaskShapeCanvas-DI4BY7W2-CEMqjRJN.js → MaskShapeCanvas-DI4BY7W2-Cb-CQXln.js} +1 -1
  7. package/assets/viewer/embed/assets/{MotionZonesSettings-CiYjd-yl-D_6jvati.js → MotionZonesSettings-CiYjd-yl-m3SV5EsR.js} +1 -1
  8. package/assets/viewer/embed/assets/{PrivacyMaskSettings-BmRdUrPp-BIB4Ve84.js → PrivacyMaskSettings-BmRdUrPp-EEX8FXC1.js} +1 -1
  9. package/assets/viewer/embed/assets/{SceneMonitorEditor-J4Ix_0tu-C6Xky6hS.js → SceneMonitorEditor-J4Ix_0tu-CSaKW_fd.js} +1 -1
  10. package/assets/viewer/embed/assets/{index-BhAHkshc.js → index-Do4HR8G8.js} +20 -20
  11. package/assets/viewer/embed/index.html +1 -1
  12. package/assets/viewer/index.html +1 -1
  13. package/dist/_stub.js +2 -2
  14. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-PkgzkqZQ.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-BWnvPLO-.mjs} +2 -2
  15. package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DdeKARA7.mjs +26 -0
  16. package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-8zgS5KkE.mjs +26 -0
  17. package/dist/{hostInit-CwwBxk0T.mjs → hostInit-CnA8Kd3k.mjs} +2 -2
  18. package/dist/index.js +178 -181
  19. package/dist/index.mjs +178 -181
  20. package/dist/remoteEntry.js +1 -1
  21. package/package.json +2 -2
  22. package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-B_-LNNZA.mjs +0 -26
  23. package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-2tr5LoMh.mjs +0 -26
package/dist/index.mjs CHANGED
@@ -805,7 +805,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
805
805
  return EventCategory;
806
806
  }({});
807
807
  //#endregion
808
- //#region ../types/dist/composed-stable-id-jnvhwGoH.mjs
808
+ //#region ../types/dist/composed-stable-id-DFNyOFzz.mjs
809
809
  /**
810
810
  import { errMsg } from '@camstack/types'
811
811
  * Extract a human-readable message from an unknown error value.
@@ -818,6 +818,7 @@ function errMsg$2(err) {
818
818
  }
819
819
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
820
820
  DeviceType["Camera"] = "camera";
821
+ /** Legacy stored value, read only by the hub-to-integration migrations; no live device carries it. */
821
822
  DeviceType["Hub"] = "hub";
822
823
  DeviceType["Light"] = "light";
823
824
  DeviceType["Siren"] = "siren";
@@ -6029,7 +6030,7 @@ var ZodIssueCode = {
6029
6030
  var ZodFirstPartyTypeKind;
6030
6031
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
6031
6032
  //#endregion
6032
- //#region ../types/dist/sleep-Cw1uUXvl.mjs
6033
+ //#region ../types/dist/sleep-D_NpiLFP.mjs
6033
6034
  /**
6034
6035
  * The audio chunk plane's byte format, and the ONE expansion from a coded
6035
6036
  * window to float samples (D455).
@@ -13791,10 +13792,6 @@ var CAMERA_CAP_VOCABULARY = {
13791
13792
  scope: "device",
13792
13793
  noun: t("Admin link", "Link di amministrazione")
13793
13794
  },
13794
- "device-discovery": {
13795
- scope: "device",
13796
- noun: t("Discovery", "Rilevamento dispositivi")
13797
- },
13798
13795
  "device-extension": {
13799
13796
  scope: "device",
13800
13797
  noun: t("Device extension", "Estensione del dispositivo")
@@ -15364,7 +15361,6 @@ var CAP_NAMES = Object.freeze([
15364
15361
  "device-admin-link",
15365
15362
  "device-adoption",
15366
15363
  "device-credentials",
15367
- "device-discovery",
15368
15364
  "device-export",
15369
15365
  "device-extension",
15370
15366
  "device-history",
@@ -15986,13 +15982,6 @@ Object.freeze({
15986
15982
  "valueType": "string"
15987
15983
  }
15988
15984
  ],
15989
- "device-discovery": [{
15990
- "path": "lastDiscoveryAt",
15991
- "valueType": "number"
15992
- }, {
15993
- "path": "lastError",
15994
- "valueType": "string"
15995
- }],
15996
15985
  "device-export": [
15997
15986
  {
15998
15987
  "path": "linkState",
@@ -17468,7 +17457,7 @@ function sleep(ms) {
17468
17457
  return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
17469
17458
  }
17470
17459
  //#endregion
17471
- //#region ../types/dist/implemented-methods-OitwyO1Y.mjs
17460
+ //#region ../types/dist/implemented-methods-M5aguGon.mjs
17472
17461
  /**
17473
17462
  * The ffmpeg build every CamStack node downloads, per platform and arch.
17474
17463
  *
@@ -44325,6 +44314,62 @@ var WeekdayKeySchema = _enum([
44325
44314
  "sat",
44326
44315
  "sun"
44327
44316
  ]);
44317
+ /**
44318
+ * Hold semantics — "for N seconds" on a leaf of the `when` tree (#498).
44319
+ *
44320
+ * ONE primitive, `for: { ms, mode, tolerance? }`, shared by `device-becomes`,
44321
+ * `device-is` and `expression`:
44322
+ *
44323
+ * - `held`: the condition stays true for `ms`;
44324
+ * - `stable`: the value does not move by more than `tolerance` (absolute, in
44325
+ * the field's base unit) for `ms` while the condition holds.
44326
+ *
44327
+ * {@link HoldCore} is the pure state machine (an input observation → a reading).
44328
+ * {@link HoldTracker} keys cores by a leaf path for the STATE leaves the tree
44329
+ * evaluator judges. {@link BecomesWatch} wraps a core with a timer for the
44330
+ * `device-becomes` EVENT leaf: the deadline is armed when the hold starts and
44331
+ * cancelled when it breaks, and the leaf fires ONCE per episode.
44332
+ *
44333
+ * Hold state is memory only. A hold that is already running when the watcher
44334
+ * first looks (a restart) is INHERITED: nobody knows when it began, so it never
44335
+ * fires for that episode and a state leaf reads it as unknown until the window
44336
+ * has elapsed from the moment the watcher started (D49: not-known is not false).
44337
+ */
44338
+ var HOLD_MAX_MS = 864e5;
44339
+ var HoldModeSchema = _enum(["held", "stable"]);
44340
+ var HoldSpecSchema = object({
44341
+ /** How long the condition (or the value) must hold. */
44342
+ ms: number$1().int().min(1).max(HOLD_MAX_MS),
44343
+ mode: HoldModeSchema,
44344
+ /** `stable` only: the largest move of the value that still counts as unchanged (absolute, base unit). */
44345
+ tolerance: number$1().min(0).optional()
44346
+ });
44347
+ /** What a trace says about a hold. */
44348
+ var HoldTraceSchema = object({
44349
+ phase: _enum([
44350
+ "pending",
44351
+ "cancelled",
44352
+ "fired",
44353
+ "reseeded"
44354
+ ]),
44355
+ ms: number$1().int(),
44356
+ mode: HoldModeSchema,
44357
+ /** When the hold started (ms epoch). */
44358
+ since: number$1().optional(),
44359
+ /** When it completes (ms epoch), for a pending hold. */
44360
+ deadline: number$1().optional()
44361
+ });
44362
+ /** The operators a `device-becomes` leaf may carry: a threshold or a range. */
44363
+ var BecomesOperatorSchema = _enum([
44364
+ "eq",
44365
+ "ne",
44366
+ "gt",
44367
+ "gte",
44368
+ "lt",
44369
+ "lte",
44370
+ "between",
44371
+ "outside"
44372
+ ]);
44328
44373
  /** How a state leaf compares a device field to a value. Derived from the
44329
44374
  * field's `kind` in `deviceManager.getWireableFields`, never hand-maintained. */
44330
44375
  var AutomationConditionOperatorSchema = _enum([
@@ -44348,18 +44393,52 @@ var DeviceBecomesLeafSchema = object({
44348
44393
  deviceId: number$1().int().nonnegative(),
44349
44394
  cap: string().min(1),
44350
44395
  fieldPath: string().min(1),
44351
- /** Fire when the field takes this value. Omit to fire on any change. */
44396
+ /** Fire when the field takes this value. Omit (with no `operator`) to fire on any change. */
44352
44397
  becomes: union([
44353
44398
  string(),
44354
44399
  number$1(),
44355
44400
  boolean()
44356
44401
  ]).optional(),
44357
- /** Only on a CHANGE of value, not on every re-report. */
44402
+ /**
44403
+ * A threshold or a range instead of an equality: "crosses above 3000", "enters
44404
+ * 18..24". The leaf fires on the TRANSITION into the predicate, never on a re-report.
44405
+ * `value` is in the field's base unit; `between` / `outside` take `[low, high]`.
44406
+ */
44407
+ operator: BecomesOperatorSchema.optional(),
44408
+ value: union([
44409
+ number$1(),
44410
+ string(),
44411
+ boolean(),
44412
+ array(number$1()).length(2)
44413
+ ]).optional(),
44414
+ /**
44415
+ * Hold: the transition (or, with no predicate, the new value) must stay for
44416
+ * `for.ms` before the leaf fires, ONCE per episode. See `hold.ts`.
44417
+ */
44418
+ for: HoldSpecSchema.optional(),
44419
+ /** @deprecated every leaf fires on a transition now; read as always on. */
44358
44420
  edge: boolean().optional(),
44359
- /** The new value must hold this long before it counts. */
44360
- forMs: number$1().int().min(0).max(864e5).optional(),
44421
+ /** @deprecated legacy `held` window — read through `holdOf` as `for: { ms, mode: 'held' }`. */
44422
+ forMs: number$1().int().min(0).max(HOLD_MAX_MS).optional(),
44361
44423
  /** Collapse a burst into one occurrence. */
44362
44424
  debounceMs: number$1().int().min(0).max(6e5).optional()
44425
+ }).superRefine((leaf, ctx) => {
44426
+ if (leaf.becomes !== void 0 && leaf.operator !== void 0) ctx.addIssue({
44427
+ code: "custom",
44428
+ message: "a leaf names `becomes` or `operator`, not both",
44429
+ path: ["operator"]
44430
+ });
44431
+ if (leaf.operator !== void 0 && leaf.value === void 0) ctx.addIssue({
44432
+ code: "custom",
44433
+ message: "an operator needs the value to compare to",
44434
+ path: ["value"]
44435
+ });
44436
+ const range = leaf.operator === "between" || leaf.operator === "outside";
44437
+ if (leaf.operator !== void 0 && range !== Array.isArray(leaf.value)) ctx.addIssue({
44438
+ code: "custom",
44439
+ message: range ? "a range takes [low, high]" : "only a range takes [low, high]",
44440
+ path: ["value"]
44441
+ });
44363
44442
  });
44364
44443
  var DeviceEventLeafSchema = object({
44365
44444
  kind: literal("device-event"),
@@ -44424,7 +44503,9 @@ var DeviceIsLeafSchema = object({
44424
44503
  QuantityValueSchema
44425
44504
  ]),
44426
44505
  /** The unit the person picked for `value` (display only; `value` is in the base unit). */
44427
- unit: string().min(1).optional()
44506
+ unit: string().min(1).optional(),
44507
+ /** The comparison must hold (`held`) or the value stay put (`stable`) this long. */
44508
+ for: HoldSpecSchema.optional()
44428
44509
  });
44429
44510
  /**
44430
44511
  * True when the camera currently has a PARKED object matching `subjects` in at
@@ -44447,7 +44528,9 @@ var StationaryPresentLeafSchema = object({
44447
44528
  var ExpressionLeafSchema = object({
44448
44529
  kind: literal("expression"),
44449
44530
  expr: string().min(1).max(MAX_EXPRESSION_SOURCE_LENGTH),
44450
- bindings: record(string().regex(EXPRESSION_IDENTIFIER_RE), ExpressionBindingSourceSchema)
44531
+ bindings: record(string().regex(EXPRESSION_IDENTIFIER_RE), ExpressionBindingSourceSchema),
44532
+ /** The expression must stay true this long. An expression has no single value, so only `held`. */
44533
+ for: HoldSpecSchema.optional()
44451
44534
  }).superRefine((src, ctx) => {
44452
44535
  const err = validateExpressionSource(src);
44453
44536
  if (err !== null) ctx.addIssue({
@@ -44455,6 +44538,11 @@ var ExpressionLeafSchema = object({
44455
44538
  message: err,
44456
44539
  path: ["expr"]
44457
44540
  });
44541
+ if (src.for?.mode === "stable") ctx.addIssue({
44542
+ code: "custom",
44543
+ message: "an expression is held, not stable: it has no single value to keep still",
44544
+ path: ["for", "mode"]
44545
+ });
44458
44546
  });
44459
44547
  var AutomationWhenSchema = lazy(() => discriminatedUnion("kind", [
44460
44548
  object({
@@ -45214,7 +45302,9 @@ var AutomationTriggerTraceSchema = object({
45214
45302
  /** Why an event was rejected ("class person not in [dog]") or what fired. */
45215
45303
  reason: string(),
45216
45304
  /** deviceId, className, trackId, score … — only what the trigger exposes. */
45217
- vars: record(string(), TraceValueSchema)
45305
+ vars: record(string(), TraceValueSchema),
45306
+ /** A hold (`for`) this occurrence went through: pending, cancelled, fired or re-seeded. */
45307
+ hold: HoldTraceSchema.optional()
45218
45308
  });
45219
45309
  var AutomationConditionTraceNodeSchema = object({
45220
45310
  /** `when` for the root, `when.<i>` for its i-th child, … (`conditions…` on an old trace). */
@@ -45560,7 +45650,7 @@ object({
45560
45650
  * is irrelevant; the array is treated as a set by consumers. */
45561
45651
  hiddenChildIds: array(number$1()).readonly()
45562
45652
  });
45563
- DeviceType.Camera, DeviceType.Hub, DeviceType.Switch, DeviceType.Light, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Cover, DeviceType.Lock, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Generic, method(object({
45653
+ DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Cover, DeviceType.Lock, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Generic, method(object({
45564
45654
  deviceId: number$1().int().nonnegative(),
45565
45655
  childDeviceId: number$1().int().nonnegative(),
45566
45656
  hidden: boolean()
@@ -50255,7 +50345,7 @@ DeviceType.MediaPlayer, optionalMethod(deviceOnly, _void(), {
50255
50345
  kind: "mutation",
50256
50346
  auth: "protected"
50257
50347
  });
50258
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway, DeviceType.HeatPump, DeviceType.Camera, DeviceType.Fan, DeviceType.Lock, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Gateway, DeviceType.Hub, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.MediaPlayer;
50348
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway, DeviceType.HeatPump, DeviceType.Camera, DeviceType.Fan, DeviceType.Lock, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Gateway, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.MediaPlayer;
50259
50349
  var NUMBER = {
50260
50350
  kind: "fixed",
50261
50351
  result: ["number"]
@@ -51648,27 +51738,35 @@ var DeviceAdminLinkSchema = object({
51648
51738
  });
51649
51739
  method(object({ deviceId: number$1().int().nonnegative() }), DeviceAdminLinkSchema.nullable(), { auth: "admin" });
51650
51740
  /**
51651
- * device-discovery — device-scoped capability for parents that host /
51652
- * enumerate child devices (Reolink Hub / NVR, ONVIF gateway, future
51653
- * integrations). The parent advertises a list of discoverable children,
51654
- * and the operator promotes a subset to real devices via `adoptDevice`.
51655
- * Child lifecycle (kernel device create/remove, parent reference) is
51656
- * owned by the framework so a single shared `<DiscoveryPanel />` can
51657
- * drive any integration.
51658
- *
51659
- * Boundaries:
51660
- * - The cap exposes ENUMERATION + ADOPT/RELEASE only. The protocol
51661
- * used to discover children (CGI poll, mDNS, push from hub, ...)
51662
- * is the integration's business; results land in `runtimeState`
51663
- * so the panel can render without a fresh round-trip.
51664
- * - `childNativeId` is integration-defined and must be stable across
51665
- * reboots so re-discovery doesn't duplicate adopted children.
51666
- * - `adoptDevice` returns the new `deviceId` so the UI can navigate
51667
- * directly to the freshly-created child's settings page.
51668
- */
51669
- /**
51670
- * Status enum for a discovered device. Mirrors the Reolink simpleEvent
51671
- * lifecycle (`online` / `sleeping` / `offline`) — generic enough for
51741
+ * `device-adoption` — generic discovery + adoption surface,
51742
+ * system-scoped collection (one provider per integration addon), routed
51743
+ * by explicit `{ addonId }` on direct `deviceAdoption.*` calls — the same
51744
+ * pin model as `connection-test`. The admin UI keeps using
51745
+ * `deviceManager.adoption*` (which already threads `addonId`). The de-HA-ified
51746
+ * successor to `ha-discovery`:
51747
+ * keyed by `integrationId` (the addon resolves integrationId → broker
51748
+ * internally) rather than a connection-specific `brokerId`, and it
51749
+ * OWNS the shared `DiscoveredChildDevice` candidate type
51750
+ * (declared below) so a single shared adoption modal renders any integration's
51751
+ * candidate tree.
51752
+ *
51753
+ * UI flow (Integrations page → integration detail):
51754
+ * 1. `listCandidates({integrationId, page, pageSize, filter})` →
51755
+ * paginated candidate list, each row collapsed.
51756
+ * 2. User expands a row → `getCandidate({integrationId,
51757
+ * childNativeId})` returns the single candidate (with its nested
51758
+ * `children`) for the accordion render.
51759
+ * 3. User clicks "Adopt" on one or more candidates →
51760
+ * `adopt({integrationId, childNativeIds, perCandidate?})`
51761
+ * materialises one parent CamStack device per candidate plus its
51762
+ * accessory children. `perCandidate[childNativeId]` carries an
51763
+ * optional display-name override + a `hiddenChildIds` pre-hide set
51764
+ * (the parent's `accessories.hiddenChildIds` gates UI visibility).
51765
+ * 4. User clicks "Release" → `release({integrationId, camDeviceId})`
51766
+ * removes the parent + every child from the kernel registry.
51767
+ */
51768
+ /**
51769
+ * Status enum for a discovered device. Generic enough for
51672
51770
  * battery cams, awake cams, and unreachable cams alike.
51673
51771
  */
51674
51772
  var DiscoveredChildStatusSchema = _enum([
@@ -51685,12 +51783,12 @@ var DiscoveredChildDeviceSchema = lazy(() => object({
51685
51783
  /** DeviceType the child should be created with on adopt. */
51686
51784
  type: _enum(DeviceType),
51687
51785
  status: DiscoveredChildStatusSchema,
51688
- /** Free-form integration-specific metadata surfaced in the panel. */
51786
+ /** Free-form integration-specific metadata surfaced in the adoption modal. */
51689
51787
  metadata: object({
51690
51788
  model: string().optional(),
51691
51789
  serialNumber: string().optional(),
51692
51790
  uid: string().optional(),
51693
- /** Reolink: 0-based channel index inside the parent NVR/Hub. */
51791
+ /** Reolink: 0-based channel index inside the parent NVR. */
51694
51792
  rtspChannel: number$1().int().nonnegative().optional(),
51695
51793
  isBattery: boolean().optional(),
51696
51794
  isDoorbell: boolean().optional(),
@@ -51706,86 +51804,24 @@ var DiscoveredChildDeviceSchema = lazy(() => object({
51706
51804
  }).default({}),
51707
51805
  /**
51708
51806
  * `true` when the framework already created a child device for this
51709
- * `childNativeId` under the current parent. The panel uses it to
51807
+ * `childNativeId` under the current parent. The adoption modal uses it to
51710
51808
  * gate the Add/Remove button and surface the existing `deviceId`.
51711
51809
  */
51712
51810
  alreadyAdopted: boolean(),
51713
51811
  /** When `alreadyAdopted=true`, the framework-assigned child device id. */
51714
51812
  adoptedDeviceId: number$1().int().nonnegative().nullable(),
51715
- /** Capability names the candidate advertises — integrations populate, Hubs omit. */
51813
+ /** Capability names the candidate advertises — integrations populate, flat enumerations omit. */
51716
51814
  capabilities: array(string()).readonly().optional(),
51717
- /** Feature flags the candidate advertises — integrations populate, Hubs omit. */
51815
+ /** Feature flags the candidate advertises — integrations populate, flat enumerations omit. */
51718
51816
  features: array(string()).readonly().optional(),
51719
51817
  /** Upstream-system identity + rendering hints for the candidate. */
51720
51818
  sourceInfo: SourceInfoSchema.optional(),
51721
- /** Nested entity-children for accordion preview — integrations populate, Hubs omit. */
51819
+ /** Nested entity-children for accordion preview — integrations populate, flat enumerations omit. */
51722
51820
  children: array(DiscoveredChildDeviceSchema).readonly().optional(),
51723
51821
  /** `childNativeId` of the gateway candidate in the same list this device sits behind. */
51724
51822
  parentStableId: string().optional()
51725
51823
  }));
51726
51824
  /**
51727
- * Status block — populated by the integration after each
51728
- * `refreshDiscovery` (or push-driven update). The runtime-state slice
51729
- * is what the panel reads via the per-device proxy; `getStatus`
51730
- * returns the same payload via the codegen'd auto-injection.
51731
- */
51732
- var DeviceDiscoveryStatusSchema = object({
51733
- discovered: array(DiscoveredChildDeviceSchema),
51734
- /** Wall-clock ms of the last successful enumeration. */
51735
- lastDiscoveryAt: number$1().int().nonnegative().nullable(),
51736
- /** Last error surfaced from the source (rendered as a banner). */
51737
- lastError: string().nullable()
51738
- });
51739
- DeviceType.Hub, DeviceDiscoveryStatusSchema.extend({ lastFetchedAt: number$1().int().nonnegative() }), method(object({ deviceId: number$1().int().nonnegative() }), array(DiscoveredChildDeviceSchema).readonly()), method(object({ deviceId: number$1().int().nonnegative() }), array(DiscoveredChildDeviceSchema).readonly(), {
51740
- kind: "mutation",
51741
- auth: "admin"
51742
- }), method(object({
51743
- deviceId: number$1().int().nonnegative(),
51744
- childNativeId: string(),
51745
- /** Optional override for the child's display name. */
51746
- name: string().optional()
51747
- }), object({
51748
- deviceId: number$1().int().nonnegative(),
51749
- stableId: string()
51750
- }), {
51751
- kind: "mutation",
51752
- auth: "admin"
51753
- }), method(object({
51754
- deviceId: number$1().int().nonnegative(),
51755
- childDeviceId: number$1().int().nonnegative()
51756
- }), _void(), {
51757
- kind: "mutation",
51758
- auth: "admin"
51759
- });
51760
- /**
51761
- * `device-adoption` — generic discovery + adoption surface,
51762
- * system-scoped collection (one provider per integration addon), routed
51763
- * by explicit `{ addonId }` on direct `deviceAdoption.*` calls — the same
51764
- * pin model as `connection-test`. The admin UI keeps using
51765
- * `deviceManager.adoption*` (which already threads `addonId`). The de-HA-ified
51766
- * successor to `ha-discovery`:
51767
- * keyed by `integrationId` (the addon resolves integrationId → broker
51768
- * internally) rather than a connection-specific `brokerId`, and it
51769
- * REUSES the shared `DiscoveredChildDevice` candidate type from
51770
- * `device-discovery.cap.ts` so a single shared adoption panel renders
51771
- * any integration's candidate tree.
51772
- *
51773
- * UI flow (Integrations page → integration detail):
51774
- * 1. `listCandidates({integrationId, page, pageSize, filter})` →
51775
- * paginated candidate list, each row collapsed.
51776
- * 2. User expands a row → `getCandidate({integrationId,
51777
- * childNativeId})` returns the single candidate (with its nested
51778
- * `children`) for the accordion render.
51779
- * 3. User clicks "Adopt" on one or more candidates →
51780
- * `adopt({integrationId, childNativeIds, perCandidate?})`
51781
- * materialises one parent CamStack device per candidate plus its
51782
- * accessory children. `perCandidate[childNativeId]` carries an
51783
- * optional display-name override + a `hiddenChildIds` pre-hide set
51784
- * (the parent's `accessories.hiddenChildIds` gates UI visibility).
51785
- * 4. User clicks "Release" → `release({integrationId, camDeviceId})`
51786
- * removes the parent + every child from the kernel registry.
51787
- */
51788
- /**
51789
51825
  * Provider-declared discovery *granularity* filter (the keystone of the
51790
51826
  * single-entity-import design). A provider advertises which discovery
51791
51827
  * granularities it supports via `listCandidateFilters`; the operator picks
@@ -72909,7 +72945,7 @@ object({
72909
72945
  offSeconds: number$1().int(),
72910
72946
  lastFetchedAt: number$1()
72911
72947
  });
72912
- DeviceType.Gateway, DeviceType.Hub, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater;
72948
+ DeviceType.Gateway, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater;
72913
72949
  var deviceInput$1 = object({ deviceId: number$1().int().nonnegative() });
72914
72950
  systemMethod(deviceInput$1, PowerSourceInfoSchema, { auth: "protected" }), systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
72915
72951
  kind: "mutation",
@@ -85520,41 +85556,6 @@ Object.freeze({
85520
85556
  access: "create",
85521
85557
  role: "admin"
85522
85558
  },
85523
- "deviceDiscovery.adoptDevice": {
85524
- capName: "device-discovery",
85525
- capScope: "device",
85526
- addonId: null,
85527
- access: "create",
85528
- role: "admin"
85529
- },
85530
- "deviceDiscovery.getStatus": {
85531
- capName: "device-discovery",
85532
- capScope: "device",
85533
- addonId: null,
85534
- access: "view",
85535
- role: "viewer"
85536
- },
85537
- "deviceDiscovery.listDiscovered": {
85538
- capName: "device-discovery",
85539
- capScope: "device",
85540
- addonId: null,
85541
- access: "view",
85542
- role: "viewer"
85543
- },
85544
- "deviceDiscovery.refreshDiscovery": {
85545
- capName: "device-discovery",
85546
- capScope: "device",
85547
- addonId: null,
85548
- access: "create",
85549
- role: "admin"
85550
- },
85551
- "deviceDiscovery.releaseDevice": {
85552
- capName: "device-discovery",
85553
- capScope: "device",
85554
- addonId: null,
85555
- access: "create",
85556
- role: "admin"
85557
- },
85558
85559
  "deviceExport.applyDeviceSettingsPatch": {
85559
85560
  capName: "device-export",
85560
85561
  capScope: "system",
@@ -94640,35 +94641,6 @@ Object.freeze({
94640
94641
  form: "single",
94641
94642
  optional: false
94642
94643
  }],
94643
- "deviceDiscovery.adoptDevice": [{
94644
- name: "deviceId",
94645
- form: "single",
94646
- optional: false
94647
- }],
94648
- "deviceDiscovery.getStatus": [{
94649
- name: "deviceId",
94650
- form: "single",
94651
- optional: false
94652
- }],
94653
- "deviceDiscovery.listDiscovered": [{
94654
- name: "deviceId",
94655
- form: "single",
94656
- optional: false
94657
- }],
94658
- "deviceDiscovery.refreshDiscovery": [{
94659
- name: "deviceId",
94660
- form: "single",
94661
- optional: false
94662
- }],
94663
- "deviceDiscovery.releaseDevice": [{
94664
- name: "childDeviceId",
94665
- form: "single",
94666
- optional: false
94667
- }, {
94668
- name: "deviceId",
94669
- form: "single",
94670
- optional: false
94671
- }],
94672
94644
  "deviceExport.applyDeviceSettingsPatch": [{
94673
94645
  name: "deviceId",
94674
94646
  form: "single",
@@ -100052,8 +100024,8 @@ async function readRawKeys(read, addonId, keys) {
100052
100024
  * `<addonId>:<deviceId>.cameraSettings` in `addon-device-settings`.
100053
100025
  *
100054
100026
  * Each entry is copied VERBATIM (the value of a row is the entry the map held), so a field the
100055
- * schema does not know yet survives byte for byte. The map key stays for a release (the purge is
100056
- * `retired-settings-keys.ts`, one release later), so a rolled-back build still reads it.
100027
+ * schema does not know yet survives byte for byte. The mover leaves the map key in place; the
100028
+ * catalogue's last step (`drop-moved-maps`) deletes it once all three movers are applied.
100057
100029
  *
100058
100030
  * A row that already exists is never overwritten: it was written by the build that reads rows,
100059
100031
  * and a seed never overwrites. A plan that has nothing left to copy is empty, so a second run is
@@ -100146,7 +100118,8 @@ var DROP_BINDINGS_MIGRATION_FLAG_ID = "pipeline-orchestrator/2026-11-03-drop-bin
100146
100118
  var NODE_BINDINGS_TO_NODE_ROWS_ID = "pipeline-orchestrator/2026-11-03-node-bindings-to-node-rows";
100147
100119
  var AGENT_SETTINGS_TO_NODE_ROWS_ID = "pipeline-orchestrator/2026-11-03-agent-settings-to-node-rows";
100148
100120
  var CAMERA_SETTINGS_TO_DEVICE_ROWS_ID = "pipeline-orchestrator/2026-11-03-camera-settings-to-device-rows";
100149
- /** The three id-keyed maps this version stopped reading; their keys stay one release. */
100121
+ var DROP_MOVED_MAPS_ID = "pipeline-orchestrator/2026-11-11-drop-moved-maps";
100122
+ /** The three id-keyed maps the movers copied into rows; nothing reads them. */
100150
100123
  var NODE_BINDINGS_FIELD = "nodeBindings";
100151
100124
  var AGENT_SETTINGS_FIELD = "agentSettings";
100152
100125
  var CAMERA_SETTINGS_FIELD = "cameraSettings";
@@ -100228,6 +100201,30 @@ var ADDON_MIGRATIONS = [
100228
100201
  fixtureMark: "a step toggle and a step setting of one camera"
100229
100202
  },
100230
100203
  plan: (ports) => planBlobToDeviceRows(PIPELINE_ORCHESTRATOR_ID, CAMERA_SETTINGS_FIELD, ports)
100204
+ },
100205
+ {
100206
+ meta: {
100207
+ id: DROP_MOVED_MAPS_ID,
100208
+ owner: PIPELINE_ORCHESTRATOR_ID,
100209
+ level: "addon-state",
100210
+ seq: 5,
100211
+ dependsOn: [
100212
+ NODE_BINDINGS_TO_NODE_ROWS_ID,
100213
+ AGENT_SETTINGS_TO_NODE_ROWS_ID,
100214
+ CAMERA_SETTINGS_TO_DEVICE_ROWS_ID
100215
+ ],
100216
+ store: "settings",
100217
+ scope: "cluster",
100218
+ onFailure: "tolerate",
100219
+ bodyKind: "plan",
100220
+ description: "Delete the nodeBindings, agentSettings and cameraSettings maps once their rows are written",
100221
+ fixtureMark: "a marked field of each map, read back from the row its mover wrote"
100222
+ },
100223
+ plan: (ports) => planDropKeys(PIPELINE_ORCHESTRATOR_ID, [
100224
+ NODE_BINDINGS_FIELD,
100225
+ AGENT_SETTINGS_FIELD,
100226
+ CAMERA_SETTINGS_FIELD
100227
+ ], ports)
100231
100228
  }
100232
100229
  ];
100233
100230
  var orchestratorRecordKinds = defineRecordKinds({
@@ -30,7 +30,7 @@ async function d(e) {
30
30
  }
31
31
  }
32
32
  async function f() {
33
- return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-PkgzkqZQ.mjs")).catch((e) => {
33
+ return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-BWnvPLO-.mjs")).catch((e) => {
34
34
  throw l = void 0, e;
35
35
  }), l;
36
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-pipeline-orchestrator",
3
- "version": "1.2.678",
3
+ "version": "1.2.680",
4
4
  "description": "Hub-side camera-to-agent load balancer — tracks runner capacity and dispatches attachCamera calls to the optimal pipeline-runner instance",
5
5
  "keywords": [
6
6
  "camstack",
@@ -76,7 +76,7 @@
76
76
  }
77
77
  ],
78
78
  "requires": {
79
- "server": ">=1.2.830"
79
+ "server": ">=1.2.835"
80
80
  }
81
81
  },
82
82
  "files": [