@camstack/addon-pipeline-orchestrator 1.2.602 → 1.2.604

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.
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ node_fs = __toESM(node_fs);
30
30
  let node_path = require("node:path");
31
31
  node_path = __toESM(node_path);
32
32
  let node_url = require("node:url");
33
- //#region ../types/dist/event-category-BvOFi6PY.mjs
33
+ //#region ../types/dist/event-category-DOl51-Ij.mjs
34
34
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
35
35
  EventCategory["SystemBoot"] = "system.boot";
36
36
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -109,9 +109,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
109
109
  /**
110
110
  * The node's one-shot runner boot check (D877): planned runners against the
111
111
  * process service, `degraded` when any is failed, refused or missing. The
112
- * alert centre turns it into one alert and a direct critical push.
112
+ * alert centre turns it into one critical alert.
113
113
  */
114
114
  EventCategory["SystemRunnerCheck"] = "system.runner-check";
115
+ /**
116
+ * An alert EPISODE opened or closed, emitted by the alert centre for alerts
117
+ * of severity `critical` or `error` (`AlertEpisodePayload`). The alert
118
+ * centre sends no notification of its own: Notification Center turns this
119
+ * into the `alert-critical` / `alert-error` / `alert-critical-resolved`
120
+ * system-event kinds, and reconciles from the alerts store because a bus
121
+ * event may be dropped (D8, D11).
122
+ */
123
+ EventCategory["AlertEpisode"] = "alert.episode";
115
124
  EventCategory["AddonError"] = "addon.error";
116
125
  EventCategory["AddonPageReady"] = "addon.page-ready";
117
126
  EventCategory["AddonWidgetReady"] = "addon.widget-ready";
@@ -5569,7 +5578,7 @@ var ZodIssueCode = {
5569
5578
  var ZodFirstPartyTypeKind;
5570
5579
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5571
5580
  //#endregion
5572
- //#region ../types/dist/sleep-BOjuyoPC.mjs
5581
+ //#region ../types/dist/sleep-BxjU_fJM.mjs
5573
5582
  /**
5574
5583
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5575
5584
  * window to float samples (D455).
@@ -14551,7 +14560,14 @@ var AlertSeveritySchema = _enum([
14551
14560
  ]);
14552
14561
  var AlertActionSchema = object({
14553
14562
  label: string(),
14554
- href: string().optional()
14563
+ href: string().optional(),
14564
+ /**
14565
+ * How `href` is followed. Absent / `app`: an admin-ui route (client-side).
14566
+ * `server`: a route the HUB serves (an addon HTTP route such as an OAuth
14567
+ * start) — the browser must leave the SPA with a full navigation, because
14568
+ * the SPA has no such route and would bounce to the home page.
14569
+ */
14570
+ navigation: _enum(["app", "server"]).optional()
14555
14571
  });
14556
14572
  var AlertStatusSchema = _enum([
14557
14573
  "active",
@@ -18753,7 +18769,11 @@ DeviceType.Hub, DeviceDiscoveryStatusSchema.extend({ lastFetchedAt: number().int
18753
18769
  });
18754
18770
  /**
18755
18771
  * `device-adoption` — generic discovery + adoption surface,
18756
- * system-scoped singleton. The de-HA-ified successor to `ha-discovery`:
18772
+ * system-scoped collection (one provider per integration addon), routed
18773
+ * by explicit `{ addonId }` on direct `deviceAdoption.*` calls — the same
18774
+ * pin model as `connection-test`. The admin UI keeps using
18775
+ * `deviceManager.adoption*` (which already threads `addonId`). The de-HA-ified
18776
+ * successor to `ha-discovery`:
18757
18777
  * keyed by `integrationId` (the addon resolves integrationId → broker
18758
18778
  * internally) rather than a connection-specific `brokerId`, and it
18759
18779
  * REUSES the shared `DiscoveredChildDevice` candidate type from
@@ -42961,6 +42981,9 @@ var NcSystemEventKindSchema = _enum([
42961
42981
  "server-updated",
42962
42982
  "export-completed",
42963
42983
  "backup-completed",
42984
+ "alert-critical",
42985
+ "alert-error",
42986
+ "alert-critical-resolved",
42964
42987
  "camera-online",
42965
42988
  "camera-offline",
42966
42989
  "camera-disabled",
@@ -52943,7 +52966,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
52943
52966
  }), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
52944
52967
  kind: "mutation",
52945
52968
  auth: "admin"
52946
- }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
52969
+ }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
52970
+ clear: boolean(),
52971
+ repointLocationId: string().optional()
52972
+ }), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
52947
52973
  kind: "mutation",
52948
52974
  auth: "admin"
52949
52975
  }), method(StorageCleanupInputSchema, object({ jobId: string() }), {
@@ -56378,6 +56404,11 @@ object({
56378
56404
  *
56379
56405
  * `kind: 'poll'` — cloud REST APIs typically have no push channel; the
56380
56406
  * provider refreshes the slice on an interval and eagerly after commands.
56407
+ *
56408
+ * UNKNOWN IS NOT OFF. Every field the appliance reports separately is
56409
+ * nullable: `null` means "not known right now" (the appliance has not said,
56410
+ * the link is down, or the description does not carry it) and is never
56411
+ * rendered or exported as `false` / `0`. `availability` says why.
56381
56412
  */
56382
56413
  var DishwasherStateSchema = _enum([
56383
56414
  "idle",
@@ -56387,80 +56418,227 @@ var DishwasherStateSchema = _enum([
56387
56418
  "error",
56388
56419
  "unavailable"
56389
56420
  ]);
56421
+ /**
56422
+ * The appliance's own operation state, uncollapsed. `state` above is the coarse
56423
+ * view for compact surfaces; this is what the appliance said.
56424
+ */
56425
+ var DishwasherOperationStateSchema = _enum([
56426
+ "Inactive",
56427
+ "Ready",
56428
+ "DelayedStart",
56429
+ "Run",
56430
+ "Pause",
56431
+ "ActionRequired",
56432
+ "Finished",
56433
+ "Error",
56434
+ "Aborting"
56435
+ ]);
56436
+ /**
56437
+ * Why fields may be `null`:
56438
+ * - `available` — the link is up and the description is loaded;
56439
+ * - `offline` — the local link is down (values are unknown, not last-known);
56440
+ * - `description-missing` — the link is up but the appliance's description could not
56441
+ * be loaded, so its values cannot be decoded.
56442
+ */
56443
+ var DishwasherAvailabilitySchema = _enum([
56444
+ "available",
56445
+ "offline",
56446
+ "description-missing"
56447
+ ]);
56390
56448
  var DishwasherConsumableLevelSchema = _enum([
56391
56449
  "ok",
56392
56450
  "low",
56393
56451
  "empty"
56394
56452
  ]);
56395
56453
  object({
56454
+ availability: DishwasherAvailabilitySchema,
56455
+ /** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
56396
56456
  state: DishwasherStateSchema,
56397
- /** Active program id/name, or null when none selected / unknown. */
56457
+ /** The appliance's operation state as reported; null when not known. */
56458
+ operationState: DishwasherOperationStateSchema.nullable(),
56459
+ /** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
56398
56460
  program: string().nullable(),
56399
- /** Program tokens the hardware accepts — drives the UI selector. */
56461
+ /** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
56462
+ selectedProgram: string().nullable(),
56463
+ /** Feature keys of the programs the appliance currently offers — drives the UI selector. */
56400
56464
  availablePrograms: array(string()),
56401
- /** Minutes remaining on the active cycle, or null when not running. */
56402
- remainingMinutes: number().int().nonnegative().nullable(),
56465
+ /** Seconds remaining on the active cycle, or null when not running / not known. */
56466
+ remainingSeconds: number().int().nonnegative().nullable(),
56467
+ /** Seconds the delayed start is set to (time until the cycle starts), or null. */
56468
+ delayedStartSeconds: number().int().nonnegative().nullable(),
56403
56469
  /** Cycle completion 0..100, or null when not applicable. */
56404
56470
  progressPercent: number().min(0).max(100).nullable(),
56405
- /** True when the door is reported open. */
56406
- doorOpen: boolean(),
56407
- /** True when remote start is allowed (door closed, power on, etc.). */
56408
- remoteStartAllowed: boolean(),
56409
- /** Main power / switched-on state. */
56410
- powerOn: boolean(),
56471
+ /** True when the door is reported open; null when the door state is not known. */
56472
+ doorOpen: boolean().nullable(),
56473
+ /** True when the door is latched (locked) during a cycle; null when not reported. */
56474
+ doorLocked: boolean().nullable(),
56475
+ /** True when remote start is allowed (door closed, power on, etc.); null when not known. */
56476
+ remoteStartAllowed: boolean().nullable(),
56477
+ /** True when the appliance accepts remote control now; null when not known. */
56478
+ remoteControlActive: boolean().nullable(),
56479
+ /** True while somebody operates the appliance at its panel; null when not reported. */
56480
+ localControlActive: boolean().nullable(),
56481
+ /** Main power / switched-on state; null when not known. */
56482
+ powerOn: boolean().nullable(),
56483
+ /** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
56484
+ powerState: string().nullable(),
56411
56485
  saltLevel: DishwasherConsumableLevelSchema.nullable(),
56412
56486
  rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
56413
- halfLoad: boolean(),
56414
- hygienePlus: boolean(),
56487
+ /** Option states: null when the appliance does not expose the option or has not said. */
56488
+ halfLoad: boolean().nullable(),
56489
+ hygienePlus: boolean().nullable(),
56490
+ /** Extra dry option when the appliance exposes it. */
56491
+ extraDry: boolean().nullable(),
56492
+ /** Intensive zone (lower basket) when the appliance exposes it. */
56493
+ intensiveZone: boolean().nullable(),
56494
+ /** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
56495
+ varioSpeedPlus: boolean().nullable(),
56496
+ /** Child lock (controls disabled on the appliance); null when not known. */
56497
+ childLock: boolean().nullable(),
56498
+ /** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
56499
+ activeEvents: array(string()),
56500
+ /** Numeric error code when the appliance reports one; null otherwise. */
56415
56501
  errorCode: number().nullable(),
56502
+ /** Name of the raised alert-level event while the appliance is in error; null otherwise. */
56416
56503
  errorLabel: string().nullable(),
56504
+ /** Ms epoch of the last value received from the appliance; 0 = never. */
56417
56505
  lastFetchedAt: number()
56418
56506
  });
56419
- DeviceType.Dishwasher, method(object({ deviceId: number().int().nonnegative() }), _void(), {
56507
+ var DeviceIdSchema = number().int().nonnegative();
56508
+ /** A value a program option or setting can take. */
56509
+ var DishwasherValueSchema = union([
56510
+ boolean(),
56511
+ string(),
56512
+ number()
56513
+ ]);
56514
+ var DishwasherAccessSchema = _enum([
56515
+ "none",
56516
+ "read",
56517
+ "readWrite",
56518
+ "writeOnly",
56519
+ "readStatic"
56520
+ ]);
56521
+ /**
56522
+ * One option or setting the appliance declares, with the constraints its description
56523
+ * gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
56524
+ */
56525
+ var DishwasherOptionDescriptorSchema = object({
56526
+ /** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
56527
+ key: string(),
56528
+ /** Last segment of the key, for display. */
56529
+ name: string(),
56530
+ type: _enum([
56531
+ "boolean",
56532
+ "number",
56533
+ "enum",
56534
+ "string"
56535
+ ]),
56536
+ access: DishwasherAccessSchema,
56537
+ /** The appliance reports this entity as currently available. */
56538
+ available: boolean(),
56539
+ /** Unit the description declares for a number; null when it declares none. */
56540
+ unit: string().nullable(),
56541
+ min: number().nullable(),
56542
+ max: number().nullable(),
56543
+ step: number().nullable(),
56544
+ /** Allowed members of an enum; null for other types. */
56545
+ enumValues: array(string()).nullable(),
56546
+ defaultValue: DishwasherValueSchema.nullable()
56547
+ });
56548
+ var DishwasherProgramSchema = object({
56549
+ /** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
56550
+ key: string(),
56551
+ name: string(),
56552
+ /** The appliance currently offers this program. */
56553
+ available: boolean(),
56554
+ /** The options this program lists, with the program-level access / availability / default. */
56555
+ options: array(DishwasherOptionDescriptorSchema)
56556
+ });
56557
+ var DishwasherOptionsSchema = object({
56558
+ availability: DishwasherAvailabilitySchema,
56559
+ /** What the appliance can be told to do, from the commands its description declares. */
56560
+ supportsStart: boolean(),
56561
+ supportsPause: boolean(),
56562
+ supportsResume: boolean(),
56563
+ supportsStop: boolean(),
56564
+ supportsPower: boolean(),
56565
+ /** Every program the description lists, with its options. */
56566
+ programs: array(DishwasherProgramSchema),
56567
+ /** Every option and setting entity the description lists (programs reference these by key). */
56568
+ options: array(DishwasherOptionDescriptorSchema)
56569
+ });
56570
+ DeviceType.Dishwasher, method(object({
56571
+ deviceId: DeviceIdSchema,
56572
+ program: string().min(1).optional(),
56573
+ options: record(string(), DishwasherValueSchema).optional()
56574
+ }), _void(), {
56420
56575
  kind: "mutation",
56421
56576
  auth: "protected"
56422
- }), method(object({ deviceId: number().int().nonnegative() }), _void(), {
56577
+ }), method(object({ deviceId: DeviceIdSchema }), _void(), {
56423
56578
  kind: "mutation",
56424
56579
  auth: "protected"
56425
- }), method(object({ deviceId: number().int().nonnegative() }), _void(), {
56580
+ }), method(object({ deviceId: DeviceIdSchema }), _void(), {
56581
+ kind: "mutation",
56582
+ auth: "protected"
56583
+ }), method(object({ deviceId: DeviceIdSchema }), _void(), {
56426
56584
  kind: "mutation",
56427
56585
  auth: "protected"
56428
56586
  }), method(object({
56429
- deviceId: number().int().nonnegative(),
56587
+ deviceId: DeviceIdSchema,
56430
56588
  program: string().min(1)
56431
56589
  }), _void(), {
56432
56590
  kind: "mutation",
56433
56591
  auth: "protected"
56434
56592
  }), method(object({
56435
- deviceId: number().int().nonnegative(),
56593
+ deviceId: DeviceIdSchema,
56436
56594
  on: boolean()
56437
56595
  }), _void(), {
56438
56596
  kind: "mutation",
56439
56597
  auth: "protected"
56440
56598
  }), method(object({
56441
- deviceId: number().int().nonnegative(),
56599
+ deviceId: DeviceIdSchema,
56442
56600
  on: boolean()
56443
56601
  }), _void(), {
56444
56602
  kind: "mutation",
56445
56603
  auth: "protected"
56446
56604
  }), method(object({
56447
- deviceId: number().int().nonnegative(),
56605
+ deviceId: DeviceIdSchema,
56448
56606
  on: boolean()
56449
56607
  }), _void(), {
56450
56608
  kind: "mutation",
56451
56609
  auth: "protected"
56452
56610
  }), method(object({
56453
- deviceId: number().int().nonnegative(),
56611
+ deviceId: DeviceIdSchema,
56612
+ on: boolean()
56613
+ }), _void(), {
56614
+ kind: "mutation",
56615
+ auth: "protected"
56616
+ }), method(object({
56617
+ deviceId: DeviceIdSchema,
56618
+ on: boolean()
56619
+ }), _void(), {
56620
+ kind: "mutation",
56621
+ auth: "protected"
56622
+ }), method(object({
56623
+ deviceId: DeviceIdSchema,
56624
+ on: boolean()
56625
+ }), _void(), {
56626
+ kind: "mutation",
56627
+ auth: "protected"
56628
+ }), method(object({
56629
+ deviceId: DeviceIdSchema,
56630
+ on: boolean()
56631
+ }), _void(), {
56632
+ kind: "mutation",
56633
+ auth: "protected"
56634
+ }), method(object({
56635
+ deviceId: DeviceIdSchema,
56454
56636
  key: string().min(1),
56455
- value: union([
56456
- boolean(),
56457
- string(),
56458
- number()
56459
- ])
56637
+ value: DishwasherValueSchema
56460
56638
  }), _void(), {
56461
56639
  kind: "mutation",
56462
56640
  auth: "protected"
56463
- });
56641
+ }), method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" });
56464
56642
  object({
56465
56643
  /** Ms epoch of the last press. null = never observed since this provider started. */
56466
56644
  lastPressedAt: number().nullable(),
@@ -66639,6 +66817,12 @@ Object.freeze({
66639
66817
  addonId: null,
66640
66818
  access: "view"
66641
66819
  },
66820
+ "dishwasher.getOptions": {
66821
+ capName: "dishwasher",
66822
+ capScope: "device",
66823
+ addonId: null,
66824
+ access: "view"
66825
+ },
66642
66826
  "dishwasher.getStatus": {
66643
66827
  capName: "dishwasher",
66644
66828
  capScope: "device",
@@ -66651,6 +66835,24 @@ Object.freeze({
66651
66835
  addonId: null,
66652
66836
  access: "create"
66653
66837
  },
66838
+ "dishwasher.resume": {
66839
+ capName: "dishwasher",
66840
+ capScope: "device",
66841
+ addonId: null,
66842
+ access: "create"
66843
+ },
66844
+ "dishwasher.setChildLock": {
66845
+ capName: "dishwasher",
66846
+ capScope: "device",
66847
+ addonId: null,
66848
+ access: "create"
66849
+ },
66850
+ "dishwasher.setExtraDry": {
66851
+ capName: "dishwasher",
66852
+ capScope: "device",
66853
+ addonId: null,
66854
+ access: "create"
66855
+ },
66654
66856
  "dishwasher.setHalfLoad": {
66655
66857
  capName: "dishwasher",
66656
66858
  capScope: "device",
@@ -66663,6 +66865,12 @@ Object.freeze({
66663
66865
  addonId: null,
66664
66866
  access: "create"
66665
66867
  },
66868
+ "dishwasher.setIntensiveZone": {
66869
+ capName: "dishwasher",
66870
+ capScope: "device",
66871
+ addonId: null,
66872
+ access: "create"
66873
+ },
66666
66874
  "dishwasher.setOption": {
66667
66875
  capName: "dishwasher",
66668
66876
  capScope: "device",
@@ -66681,6 +66889,12 @@ Object.freeze({
66681
66889
  addonId: null,
66682
66890
  access: "create"
66683
66891
  },
66892
+ "dishwasher.setVarioSpeedPlus": {
66893
+ capName: "dishwasher",
66894
+ capScope: "device",
66895
+ addonId: null,
66896
+ access: "create"
66897
+ },
66684
66898
  "dishwasher.start": {
66685
66899
  capName: "dishwasher",
66686
66900
  capScope: "device",
@@ -71127,6 +71341,12 @@ Object.freeze({
71127
71341
  addonId: null,
71128
71342
  access: "view"
71129
71343
  },
71344
+ "storageMigration.moverClearance": {
71345
+ capName: "storage-migration",
71346
+ capScope: "system",
71347
+ addonId: null,
71348
+ access: "view"
71349
+ },
71130
71350
  "storageMigration.movers": {
71131
71351
  capName: "storage-migration",
71132
71352
  capScope: "system",
@@ -73348,6 +73568,11 @@ Object.freeze({
73348
73568
  form: "single",
73349
73569
  optional: false
73350
73570
  }],
73571
+ "dishwasher.getOptions": [{
73572
+ name: "deviceId",
73573
+ form: "single",
73574
+ optional: false
73575
+ }],
73351
73576
  "dishwasher.getStatus": [{
73352
73577
  name: "deviceId",
73353
73578
  form: "single",
@@ -73358,6 +73583,21 @@ Object.freeze({
73358
73583
  form: "single",
73359
73584
  optional: false
73360
73585
  }],
73586
+ "dishwasher.resume": [{
73587
+ name: "deviceId",
73588
+ form: "single",
73589
+ optional: false
73590
+ }],
73591
+ "dishwasher.setChildLock": [{
73592
+ name: "deviceId",
73593
+ form: "single",
73594
+ optional: false
73595
+ }],
73596
+ "dishwasher.setExtraDry": [{
73597
+ name: "deviceId",
73598
+ form: "single",
73599
+ optional: false
73600
+ }],
73361
73601
  "dishwasher.setHalfLoad": [{
73362
73602
  name: "deviceId",
73363
73603
  form: "single",
@@ -73368,6 +73608,11 @@ Object.freeze({
73368
73608
  form: "single",
73369
73609
  optional: false
73370
73610
  }],
73611
+ "dishwasher.setIntensiveZone": [{
73612
+ name: "deviceId",
73613
+ form: "single",
73614
+ optional: false
73615
+ }],
73371
73616
  "dishwasher.setOption": [{
73372
73617
  name: "deviceId",
73373
73618
  form: "single",
@@ -73383,6 +73628,11 @@ Object.freeze({
73383
73628
  form: "single",
73384
73629
  optional: false
73385
73630
  }],
73631
+ "dishwasher.setVarioSpeedPlus": [{
73632
+ name: "deviceId",
73633
+ form: "single",
73634
+ optional: false
73635
+ }],
73386
73636
  "dishwasher.start": [{
73387
73637
  name: "deviceId",
73388
73638
  form: "single",
@@ -75521,6 +75771,9 @@ new Map(Object.entries({
75521
75771
  "wrapper-update-available": "system",
75522
75772
  "backup-completed": "system",
75523
75773
  "export-completed": "system",
75774
+ "alert-critical": "system",
75775
+ "alert-error": "system",
75776
+ "alert-critical-resolved": "system",
75524
75777
  "storage-location-low": "system",
75525
75778
  "storage-location-critical": "system",
75526
75779
  "storage-location-ok": "system",
@@ -75645,6 +75898,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
75645
75898
  "storage-location-ok"
75646
75899
  ]
75647
75900
  },
75901
+ {
75902
+ id: "alerts",
75903
+ family: "system",
75904
+ label: "Alerts",
75905
+ kinds: [
75906
+ "alert-critical",
75907
+ "alert-error",
75908
+ "alert-critical-resolved"
75909
+ ]
75910
+ },
75648
75911
  {
75649
75912
  id: "alarm",
75650
75913
  family: "alarm",
@@ -75689,6 +75952,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
75689
75952
  return [[descriptor.kind, field]];
75690
75953
  })));
75691
75954
  Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
75955
+ object({
75956
+ phase: _enum(["raised", "resolved"]),
75957
+ episodeId: string().min(1),
75958
+ alertId: string().min(1),
75959
+ severity: AlertSeveritySchema,
75960
+ category: string(),
75961
+ title: string(),
75962
+ message: string(),
75963
+ sourceType: string().optional(),
75964
+ sourceId: string().optional(),
75965
+ nodeId: string().optional(),
75966
+ /** The alert's own action link (where the operator acts on it), when it has one. */
75967
+ actionUrl: string().optional(),
75968
+ at: number()
75969
+ });
75692
75970
  var RULE_BODY_ONLY = ["body"];
75693
75971
  var RULE_TEXT = ["title", "body"];
75694
75972
  var BATTERY = ["device-battery-low", "device-battery-normal"];
@@ -75698,6 +75976,11 @@ var TANK = [
75698
75976
  "device-tank-full",
75699
75977
  "device-tank-normal"
75700
75978
  ];
75979
+ var ALERT_EPISODE = [
75980
+ "alert-critical",
75981
+ "alert-error",
75982
+ "alert-critical-resolved"
75983
+ ];
75701
75984
  var UPDATES = [
75702
75985
  "addon-update-available",
75703
75986
  "server-update-available",
@@ -75890,14 +76173,14 @@ var STATE_SUMMARY_VARS = [
75890
76173
  ([...RULE_TEXT], [...CONSUMABLE]),
75891
76174
  ([...RULE_TEXT], [...TANK]),
75892
76175
  [...RULE_TEXT],
75893
- ([...RULE_TEXT], [...UPDATES]),
75894
- ([...RULE_TEXT], [...UPDATES]),
75895
- [...RULE_TEXT],
76176
+ ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
76177
+ ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
75896
76178
  [...RULE_TEXT],
75897
76179
  [...RULE_TEXT],
75898
76180
  [...RULE_TEXT],
75899
76181
  [...RULE_TEXT],
75900
76182
  [...RULE_TEXT],
76183
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
75901
76184
  [...RULE_TEXT],
75902
76185
  [...RULE_TEXT],
75903
76186
  [...RULE_TEXT],
@@ -75915,7 +76198,11 @@ var STATE_SUMMARY_VARS = [
75915
76198
  [...RULE_TEXT],
75916
76199
  [...RULE_TEXT],
75917
76200
  [...RULE_TEXT],
75918
- [...RULE_TEXT],
76201
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
76202
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
76203
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
76204
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
76205
+ ([...RULE_TEXT], [...ALERT_EPISODE]),
75919
76206
  [...RULE_TEXT],
75920
76207
  [...RULE_TEXT],
75921
76208
  [...RULE_TEXT],
@@ -89061,6 +89348,11 @@ var SERIES_META = [
89061
89348
  displayName: "Node FPS deficit"
89062
89349
  }
89063
89350
  ];
89351
+ function refusalCounts(result) {
89352
+ const counts = {};
89353
+ for (const r of result.refused) counts[r.reason] = (counts[r.reason] ?? 0) + r.count;
89354
+ return counts;
89355
+ }
89064
89356
  var NodeStressHistoryProducer = class {
89065
89357
  accum = new BucketAccumulator();
89066
89358
  deviceHistory;
@@ -89097,7 +89389,20 @@ var NodeStressHistoryProducer = class {
89097
89389
  const closed = this.accum.takeClosed(now ?? this.nowFn());
89098
89390
  if (closed.length === 0) return 0;
89099
89391
  try {
89100
- return (await this.deviceHistory.recordBuckets({ buckets: closed })).accepted;
89392
+ await this.declare();
89393
+ const result = await this.deviceHistory.recordBuckets({ buckets: closed });
89394
+ if (result.refused.length > 0) {
89395
+ if (result.refused.some((r) => r.reason === "undeclared")) {
89396
+ this.declared = false;
89397
+ this.accum.requeue(closed);
89398
+ }
89399
+ this.logger.warn("node-stress history buckets refused", { meta: {
89400
+ buckets: closed.length,
89401
+ accepted: result.accepted,
89402
+ refused: refusalCounts(result)
89403
+ } });
89404
+ }
89405
+ return result.accepted;
89101
89406
  } catch (err) {
89102
89407
  const dropped = this.accum.requeue(closed);
89103
89408
  this.logger.warn("node-stress history flush failed — requeued", { meta: {