@camstack/system 1.2.468 → 1.2.469

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 (89) hide show
  1. package/dist/addon-utils.mjs +1 -1
  2. package/dist/{agent-https-DJ8OzQOr.js → agent-https-5OgOR-eF.js} +1 -1
  3. package/dist/{agent-https-DR1wmhYY.mjs → agent-https-b-zX78oB.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 +4 -4
  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 +5 -5
  8. package/dist/builtins/alerts/alerts.addon.js +1 -1
  9. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  10. package/dist/builtins/autotrack/index.js +1 -1
  11. package/dist/builtins/autotrack/index.mjs +1 -1
  12. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  13. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -5
  14. package/dist/builtins/calendars/calendars.addon.js +1 -1
  15. package/dist/builtins/calendars/calendars.addon.mjs +1 -1
  16. package/dist/builtins/camera-grid/index.js +1 -1
  17. package/dist/builtins/camera-grid/index.mjs +1 -1
  18. package/dist/builtins/composer/composer.addon.js +2 -2
  19. package/dist/builtins/composer/composer.addon.mjs +2 -2
  20. package/dist/builtins/console-logging/index.js +1 -1
  21. package/dist/builtins/console-logging/index.mjs +1 -1
  22. package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
  23. package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
  24. package/dist/builtins/device-history/capture/capture-engine.d.ts +24 -4
  25. package/dist/builtins/device-history/device-history.addon.js +319 -44
  26. package/dist/builtins/device-history/device-history.addon.mjs +319 -44
  27. package/dist/builtins/device-history/query/history-query.d.ts +19 -2
  28. package/dist/builtins/device-history/retention/orphans.d.ts +50 -0
  29. package/dist/builtins/device-history/retention/retention.d.ts +9 -2
  30. package/dist/builtins/device-history/runtime/history-runtime.d.ts +10 -2
  31. package/dist/builtins/device-history/store/history-store.d.ts +5 -0
  32. package/dist/builtins/device-manager/device-manager.addon.js +2 -2
  33. package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  34. package/dist/builtins/device-manager/device-meta-types.d.ts +2 -2
  35. package/dist/builtins/hub-forwarder/index.js +1 -1
  36. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  37. package/dist/builtins/keychain/index.js +3 -3
  38. package/dist/builtins/keychain/index.mjs +3 -3
  39. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  40. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  41. package/dist/builtins/local-auth/local-auth.addon.js +2 -2
  42. package/dist/builtins/local-auth/local-auth.addon.mjs +5 -5
  43. package/dist/builtins/local-network/local-network.addon.js +2 -2
  44. package/dist/builtins/local-network/local-network.addon.mjs +2 -2
  45. package/dist/builtins/loki-logging/index.js +1 -1
  46. package/dist/builtins/loki-logging/index.mjs +1 -1
  47. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  48. package/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
  49. package/dist/builtins/platform-probe/index.js +1 -1
  50. package/dist/builtins/platform-probe/index.mjs +8 -8
  51. package/dist/builtins/record-entries/index.js +1 -1
  52. package/dist/builtins/record-entries/index.mjs +1 -1
  53. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  54. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  55. package/dist/builtins/snapshot/index.js +1 -1
  56. package/dist/builtins/snapshot/index.mjs +1 -1
  57. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  58. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
  59. package/dist/builtins/sqlite-storage/index.js +1 -1
  60. package/dist/builtins/sqlite-storage/index.mjs +1 -1
  61. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
  62. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
  63. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  64. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  65. package/dist/builtins/system-config/system-config.addon.js +3 -3
  66. package/dist/builtins/system-config/system-config.addon.mjs +115 -115
  67. package/dist/builtins/winston-logging/index.js +1 -1
  68. package/dist/builtins/winston-logging/index.mjs +1 -1
  69. package/dist/{composition-sources-5rpWQhA1.js → composition-sources-BGXTiUZm.js} +1 -1
  70. package/dist/{composition-sources-Qto-S6MA.mjs → composition-sources-DTdzzyf0.mjs} +1 -1
  71. package/dist/{constants-CuO3rcw4.js → constants-2mPqJjkR.js} +1 -1
  72. package/dist/{constants-BWli8Cju.mjs → constants-md_POijo.mjs} +1 -1
  73. package/dist/{coral-accelerators-D_S1Fo5h.mjs → coral-accelerators-Qhn5TOYZ.mjs} +5 -5
  74. package/dist/{custom-action-registry-BGYDjTqY.mjs → custom-action-registry-DZSCLBuT.mjs} +37 -37
  75. package/dist/{device-ca-CGcaSheI.js → device-ca-CC58lmNV.js} +1 -1
  76. package/dist/{device-ca-C5cLlah1.mjs → device-ca-CFdyrqeJ.mjs} +1 -1
  77. package/dist/{dist-BpUtAgqR.mjs → dist-CtVVtyTX.mjs} +247 -119
  78. package/dist/{dist-l6zKmHEb.js → dist-DuBtzSCh.js} +258 -118
  79. package/dist/file-host-worker.js +1 -1
  80. package/dist/file-host-worker.mjs +1 -1
  81. package/dist/{hub-mdns-ciao-CIno_SNn.js → hub-mdns-ciao-BLsX_2cL.js} +2 -2
  82. package/dist/{hub-mdns-ciao-0KWDyIMD.mjs → hub-mdns-ciao-CmuWLPci.mjs} +2 -2
  83. package/dist/index.js +7 -7
  84. package/dist/index.mjs +225 -225
  85. package/dist/{restore-archive-B71JI-sP.js → restore-archive-CxPAuaNs.js} +1 -1
  86. package/dist/{restore-archive-DKxAZ9pI.mjs → restore-archive-D2w3z_ob.mjs} +94 -94
  87. package/dist/{wal-maintenance-BXYwFecW.mjs → wal-maintenance-DeluFl_1.mjs} +0 -0
  88. package/dist/{wal-maintenance-B6LSQ_OZ.js → wal-maintenance-EK28XXnc.js} +0 -0
  89. package/package.json +1 -1
@@ -762,7 +762,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
762
762
  return EventCategory;
763
763
  }({});
764
764
  //#endregion
765
- //#region ../types/dist/sleep-DJFUfKvA.mjs
765
+ //#region ../types/dist/sleep-CUp20JkO.mjs
766
766
  /**
767
767
  * The audio chunk plane's byte format, and the ONE expansion from a coded
768
768
  * window to float samples (D455).
@@ -4606,6 +4606,10 @@ zod.z.object({
4606
4606
  field: zod.z.string().min(1),
4607
4607
  on: zod.z.literal("advance")
4608
4608
  });
4609
+ /** The catalog field path of an item field: `<itemsPath>[].<field>` (`items[].level`). */
4610
+ function historyItemFieldPath(itemsPath, field) {
4611
+ return `${itemsPath}[].${field}`;
4612
+ }
4609
4613
  /** Capture floor (ms) applied to `gauge` / `counter` series when a field states none. */
4610
4614
  var HISTORY_DEFAULT_MIN_INTERVAL_MS = 1e4;
4611
4615
  /**
@@ -4647,7 +4651,11 @@ var ContributionSectionSchema = zod.z.object({
4647
4651
  zod.z.literal(4)
4648
4652
  ]).optional(),
4649
4653
  tab: zod.z.string().optional(),
4650
- location: zod.z.enum(["settings", "top-tab"]).optional(),
4654
+ location: zod.z.enum([
4655
+ "settings",
4656
+ "top-tab",
4657
+ "hero"
4658
+ ]).optional(),
4651
4659
  order: zod.z.number().optional(),
4652
4660
  fields: zod.z.array(zod.z.any())
4653
4661
  });
@@ -11351,7 +11359,11 @@ var ConfigSectionWithValuesSchema = zod.z.object({
11351
11359
  zod.z.literal(4)
11352
11360
  ]).optional(),
11353
11361
  tab: zod.z.string().optional(),
11354
- location: zod.z.enum(["settings", "top-tab"]).optional(),
11362
+ location: zod.z.enum([
11363
+ "settings",
11364
+ "top-tab",
11365
+ "hero"
11366
+ ]).optional(),
11355
11367
  order: zod.z.number().optional(),
11356
11368
  fields: zod.z.array(zod.z.any())
11357
11369
  });
@@ -17851,6 +17863,52 @@ var TierStatusSchema = zod.z.object({
17851
17863
  countedAt: zod.z.number().nullable()
17852
17864
  });
17853
17865
  /** Operator/diagnostic view: rows per tier, last runs, refusals and drops since boot. */
17866
+ /**
17867
+ * Why a series is orphan. `device-gone`: its device is absent from the
17868
+ * successful device listings (the departure clock). `undeclared`: its `cap:`
17869
+ * key is declared by no capability any more (a field a cap removed).
17870
+ */
17871
+ var DeviceHistoryOrphanReasonSchema = zod.z.enum(["device-gone", "undeclared"]);
17872
+ /** Rows held per stored tier. */
17873
+ var TierRowsSchema = zod.z.object({
17874
+ raw: zod.z.number().int(),
17875
+ "5m": zod.z.number().int(),
17876
+ "1h": zod.z.number().int(),
17877
+ "1d": zod.z.number().int()
17878
+ });
17879
+ var OrphanSeriesSchema = zod.z.object({
17880
+ seriesId: zod.z.number().int(),
17881
+ deviceId: zod.z.number().int(),
17882
+ key: zod.z.string(),
17883
+ scope: zod.z.string(),
17884
+ /** The metric's display name; `null` when its metric row is gone too. */
17885
+ displayName: zod.z.string().nullable(),
17886
+ reason: DeviceHistoryOrphanReasonSchema,
17887
+ /** `device-gone`: since when the device has been absent; `null` otherwise. */
17888
+ missingSince: zod.z.number().nullable(),
17889
+ firstTs: zod.z.number(),
17890
+ lastTs: zod.z.number(),
17891
+ rows: TierRowsSchema
17892
+ });
17893
+ var DeviceHistoryOrphanDeleteRefusalSchema = zod.z.enum([
17894
+ "not-found",
17895
+ "not-orphan",
17896
+ "failed"
17897
+ ]);
17898
+ var OrphanDeleteEntrySchema = zod.z.discriminatedUnion("ok", [zod.z.object({
17899
+ seriesId: zod.z.number().int(),
17900
+ ok: zod.z.literal(true),
17901
+ deleted: TierRowsSchema
17902
+ }), zod.z.object({
17903
+ seriesId: zod.z.number().int(),
17904
+ ok: zod.z.literal(false),
17905
+ reason: DeviceHistoryOrphanDeleteRefusalSchema
17906
+ })]);
17907
+ var OrphanListSchema = zod.z.object({
17908
+ series: zod.z.array(OrphanSeriesSchema).readonly(),
17909
+ /** More orphans exist than {@link DEVICE_HISTORY_ORPHAN_LIST_MAX}. */
17910
+ truncated: zod.z.boolean()
17911
+ });
17854
17912
  var DeviceHistoryStatusSchema = zod.z.object({
17855
17913
  startedAt: zod.z.number(),
17856
17914
  /** The store is declared, series loaded and the first reconcile has answered. */
@@ -17992,7 +18050,24 @@ var deviceHistoryCapability = {
17992
18050
  kind: "mutation",
17993
18051
  auth: "admin"
17994
18052
  }),
17995
- getStatus: method(zod.z.object({}), DeviceHistoryStatusSchema, { auth: "admin" })
18053
+ getStatus: method(zod.z.object({}), DeviceHistoryStatusSchema, { auth: "admin" }),
18054
+ /**
18055
+ * Device series no longer linked to a device (D917): the device is absent
18056
+ * from the listings, or the key is declared by no capability. REPORTED,
18057
+ * never purged by this judgement; each entry counts its rows per tier
18058
+ * (a primary-key range per series). Ordered by device, key, scope.
18059
+ */
18060
+ listOrphanSeries: method(zod.z.object({}), OrphanListSchema, { auth: "admin" }),
18061
+ /**
18062
+ * Delete orphan series by id. Each id is re-judged NOW: a series that is
18063
+ * not orphan (its device came back) is refused `not-orphan`, an unknown id
18064
+ * `not-found`. Deletes tier by tier in the retention slices, then the
18065
+ * series row; one entry per id, in order.
18066
+ */
18067
+ deleteOrphanSeries: method(zod.z.object({ seriesIds: zod.z.array(zod.z.number().int()).min(1).max(50) }), zod.z.object({ results: zod.z.array(OrphanDeleteEntrySchema).readonly() }), {
18068
+ kind: "mutation",
18069
+ auth: "admin"
18070
+ })
17996
18071
  }
17997
18072
  };
17998
18073
  var DeviceCaStatusSchema = zod.z.discriminatedUnion("state", [
@@ -60958,17 +61033,69 @@ var connectivityCapability = {
60958
61033
  volatileStateFields: ["lastChangedAt"]
60959
61034
  };
60960
61035
  /**
60961
- * Generic device-consumables capability — surfaces a device's
60962
- * maintenance items (vacuum filters/brushes, replaceable cartridges,
60963
- * descaling cycles, …) with their remaining life and an optional
60964
- * "Replaced" reset action. Device-agnostic: any provider that knows its
60965
- * device tracks consumables can register it; the cap declares no
60966
- * vocabulary of its own — the provider names each item verbatim.
61036
+ * Generic device-consumables capability — the ONE place a device reports what
61037
+ * it uses up or fills: wear parts (vacuum filters/brushes, cartridges,
61038
+ * descaling cycles), supplies it draws from (a vacuum's clean-water tank and
61039
+ * detergent, a dishwasher's salt and rinse aid) and waste it collects (a dirty
61040
+ * water tank, a dust bin). Each item carries its remaining life or fill and an
61041
+ * optional "Replaced" reset action. Device-agnostic: any provider that knows
61042
+ * its device tracks consumables registers it; the provider names each item
61043
+ * verbatim and says which `kind` it is.
61044
+ *
61045
+ * The admin UI renders it as ONE collapsible section directly under the
61046
+ * device page's hero card (`placement: 'hero'`), for every device bound to
61047
+ * this cap — never drawn by a device type's hero card itself (D915).
60967
61048
  *
60968
61049
  * Like `childLayout`, the cap is INERT until a provider sets items: no
60969
61050
  * provider populates it by guessing (no HA inference). The UI renders a
60970
61051
  * "No consumables reported" placeholder when `items` is empty.
60971
61052
  */
61053
+ /**
61054
+ * What an item IS, which decides which direction is bad:
61055
+ * - `wear` — a part that wears out (a brush, a filter); low life is bad.
61056
+ * - `supply` — something the device draws from (clean water, detergent,
61057
+ * salt, rinse aid); low or empty is bad.
61058
+ * - `waste` — something the device fills (dirty water, a dust bin); full is
61059
+ * bad.
61060
+ * Absent = `wear`.
61061
+ */
61062
+ var ConsumableKindSchema = zod.z.enum([
61063
+ "wear",
61064
+ "supply",
61065
+ "waste"
61066
+ ]);
61067
+ /**
61068
+ * What an item LOOKS like, which decides how a client draws it — independent
61069
+ * of `kind`, which decides which direction is bad:
61070
+ * - `part` — a part that wears (a brush, a filter, a mop pad): a wear bar,
61071
+ * remaining time and a reset.
61072
+ * - `tank` — a container of liquid (clean water, dirty water): a fill gauge.
61073
+ * - `product` — something bought and refilled (detergent, salt, rinse aid):
61074
+ * a stepped level and "refill".
61075
+ * - `bin` — a container that collects waste (a dust bin): a fill gauge
61076
+ * that warns when full.
61077
+ * Absent = derived from the kind ({@link consumableFormOf}).
61078
+ */
61079
+ var ConsumableFormSchema = zod.z.enum([
61080
+ "part",
61081
+ "tank",
61082
+ "product",
61083
+ "bin"
61084
+ ]);
61085
+ /** The provider's own discrete verdict on an item. */
61086
+ var ConsumableStatusSchema = zod.z.enum([
61087
+ "ok",
61088
+ "low",
61089
+ "empty",
61090
+ "full",
61091
+ "replace"
61092
+ ]);
61093
+ zod.z.enum([
61094
+ "ok",
61095
+ "low",
61096
+ "empty",
61097
+ "full"
61098
+ ]);
60972
61099
  /** Units a remaining-life counter is reported in. Closed: the panel renders
60973
61100
  * each. */
60974
61101
  var ConsumableRemainingUnitSchema = zod.z.enum([
@@ -60983,18 +61110,23 @@ var ConsumableRemainingSchema = zod.z.object({
60983
61110
  unit: ConsumableRemainingUnitSchema
60984
61111
  });
60985
61112
  /** A single consumable item. Either a continuous `level` (remaining
60986
- * life %) or a discrete `status` may be known — both may be null when a
60987
- * provider only knows the item exists. `level` and `status` are not
60988
- * mutually exclusive; a provider may report both. */
61113
+ * life %, or fill % for a `supply` / `waste` item) or a discrete `status`
61114
+ * may be known — both may be null when a provider only knows the item
61115
+ * exists. `level` and `status` are not mutually exclusive; a provider may
61116
+ * report both. */
60989
61117
  var ConsumableItemSchema = zod.z.object({
60990
61118
  /** Stable id, e.g. 'main-brush'. */
60991
61119
  key: zod.z.string().min(1),
60992
61120
  /** Display name. */
60993
61121
  label: zod.z.string().min(1),
60994
- /** Remaining life % when known (0..100). */
61122
+ /** Remaining life % (`wear`) or fill % (`supply`, `waste`) when known (0..100). */
60995
61123
  level: zod.z.number().min(0).max(100).nullable(),
60996
- /** Discrete state when known (binary mode). */
60997
- status: zod.z.enum(["ok", "replace"]).nullable(),
61124
+ /** The provider's discrete verdict when known (binary mode). */
61125
+ status: ConsumableStatusSchema.nullable(),
61126
+ /** What the item is — decides whether low or full is bad. Absent = `wear`. */
61127
+ kind: ConsumableKindSchema.optional(),
61128
+ /** How the item is drawn (part, tank, product, bin). Absent = derived from `kind`. */
61129
+ form: ConsumableFormSchema.optional(),
60998
61130
  /** Ms epoch of the last replace, when known. */
60999
61131
  lastResetAt: zod.z.number().nullable(),
61000
61132
  /** Whether `reset()` is meaningful for this item. */
@@ -61017,7 +61149,7 @@ var consumablesCapability = {
61017
61149
  kind: "widget",
61018
61150
  widgetId: "host/consumables-panel",
61019
61151
  tab: "consumables",
61020
- topTab: true,
61152
+ placement: "hero",
61021
61153
  label: "Consumables",
61022
61154
  order: 5
61023
61155
  } },
@@ -61078,9 +61210,37 @@ reset: method(zod.z.object({
61078
61210
  */
61079
61211
  durability: "restored",
61080
61212
  /**
61081
- * History (D850): none — `items` is an array keyed by runtime ids; a history path never enters it.
61213
+ * History (D850, D917): one series per (item field, item `key`) — the item key
61214
+ * is the series scope, the item `label` names it. A vacuum tank's fill, a
61215
+ * brush's remaining life and a dishwasher's salt are each recorded the moment
61216
+ * their provider reports them; an item that appears later gets its series.
61082
61217
  */
61083
- history: "none",
61218
+ history: {
61219
+ fields: {},
61220
+ items: {
61221
+ path: "items",
61222
+ key: "key",
61223
+ label: "label",
61224
+ fields: {
61225
+ level: {
61226
+ kind: "gauge",
61227
+ unit: "%",
61228
+ deadband: 2,
61229
+ displayName: "Level"
61230
+ },
61231
+ status: {
61232
+ kind: "enum",
61233
+ displayName: "Status"
61234
+ },
61235
+ "remaining.value": {
61236
+ kind: "gauge",
61237
+ unitFrom: "remaining.unit",
61238
+ deadband: 1,
61239
+ displayName: "Remaining"
61240
+ }
61241
+ }
61242
+ }
61243
+ },
61084
61244
  /** Clocks, not content: a re-read that changed no item costs no commit. */
61085
61245
  volatileStateFields: ["lastChangedAt", "lastFetchedAt"]
61086
61246
  };
@@ -61541,8 +61701,9 @@ onStatusChanged: { data: zod.z.object({
61541
61701
  volatileStateFields: ["lastChangedAt"]
61542
61702
  };
61543
61703
  /**
61544
- * Smart-dishwasher cap — program lifecycle, door / remote-start gates,
61545
- * consumable levels (salt, rinse aid) and common program options.
61704
+ * Smart-dishwasher cap — program lifecycle, door / remote-start gates and
61705
+ * common program options. Salt and rinse aid are NOT here: they are items of
61706
+ * the device's `consumables` cap, like every other device's (D915).
61546
61707
  *
61547
61708
  * Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
61548
61709
  * by any integration that exposes the same program / option surface.
@@ -61590,11 +61751,6 @@ var DishwasherAvailabilitySchema = zod.z.enum([
61590
61751
  "offline",
61591
61752
  "description-missing"
61592
61753
  ]);
61593
- var DishwasherConsumableLevelSchema = zod.z.enum([
61594
- "ok",
61595
- "low",
61596
- "empty"
61597
- ]);
61598
61754
  var DishwasherStatusSchema = zod.z.object({
61599
61755
  availability: DishwasherAvailabilitySchema,
61600
61756
  /** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
@@ -61627,8 +61783,6 @@ var DishwasherStatusSchema = zod.z.object({
61627
61783
  powerOn: zod.z.boolean().nullable(),
61628
61784
  /** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
61629
61785
  powerState: zod.z.string().nullable(),
61630
- saltLevel: DishwasherConsumableLevelSchema.nullable(),
61631
- rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
61632
61786
  /**
61633
61787
  * True while the appliance asks for its filter to be cleaned (smart-filter, filter-system or
61634
61788
  * combined care-and-filter reminder raised); false when every such reminder reads clear; null
@@ -71987,14 +72141,9 @@ var userManagementCapability = {
71987
72141
  * validates it against the vacuum's own list. `locate` triggers the
71988
72142
  * find-me chirp; `returnToBase` sends it home.
71989
72143
  *
71990
- * Consumable / waste tanks: `cleanWater` / `dirtyWater` / `detergent` /
71991
- * `dustBin` each carry a nullable `{ level (0..100 %), status ('ok' |
71992
- * 'low' | 'full') }` reading. Native providers (e.g. Dreame, Roborock)
71993
- * SHOULD populate whichever tanks the hardware has — leave a field `null`
71994
- * only when the device has no such tank at all, and use a `TankStatus`
71995
- * with both inner fields `null` when the tank exists but its level is
71996
- * currently unknown. HA `vacuum.*` entities expose no per-tank telemetry,
71997
- * so the HA provider leaves all four `null`.
72144
+ * Tanks (clean water, dirty water, detergent, dust bin) are NOT here: they
72145
+ * are `supply` / `waste` items of the device's `consumables` cap, like every
72146
+ * other device's consumables (D915).
71998
72147
  */
71999
72148
  var VacuumStateSchema = zod.z.enum([
72000
72149
  "idle",
@@ -72005,23 +72154,6 @@ var VacuumStateSchema = zod.z.enum([
72005
72154
  "drying",
72006
72155
  "error"
72007
72156
  ]);
72008
- /**
72009
- * One consumable / waste tank on a robot vacuum (clean-water, dirty-water,
72010
- * detergent or dust-bin). A tank can report a numeric fill `level` (0..100),
72011
- * a discrete `status` (binary-style hardware), or both. Both `null` means the
72012
- * level is currently unknown; the OWNING field being `null` means the
72013
- * hardware has no such tank at all.
72014
- */
72015
- var TankStatusSchema = zod.z.object({
72016
- /** Numeric fill 0..100 when the hardware reports a percentage; null otherwise. */
72017
- level: zod.z.number().min(0).max(100).nullable(),
72018
- /** Discrete state when the hardware is binary-mode; null otherwise. */
72019
- status: zod.z.enum([
72020
- "ok",
72021
- "low",
72022
- "full"
72023
- ]).nullable()
72024
- });
72025
72157
  var VacuumControlStatusSchema = zod.z.object({
72026
72158
  /** Lifecycle state of the vacuum. */
72027
72159
  state: VacuumStateSchema,
@@ -72033,14 +72165,6 @@ var VacuumControlStatusSchema = zod.z.object({
72033
72165
  fanSpeed: zod.z.string().nullable(),
72034
72166
  /** Speed tokens the hardware accepts — drives the UI selector. */
72035
72167
  availableFanSpeeds: zod.z.array(zod.z.string()),
72036
- /** Clean-water (mop) tank. Null when the hardware has no clean-water tank. */
72037
- cleanWater: TankStatusSchema.nullable(),
72038
- /** Dirty-water (recovery) tank. Null when the hardware has no dirty-water tank. */
72039
- dirtyWater: TankStatusSchema.nullable(),
72040
- /** Detergent tank. Null when the hardware has no detergent tank. */
72041
- detergent: TankStatusSchema.nullable(),
72042
- /** Dust bin. Null when the hardware has no dust bin. */
72043
- dustBin: TankStatusSchema.nullable(),
72044
72168
  /** 0..100 cleaning-completion percentage of the current task, or null. */
72045
72169
  progressPercent: zod.z.number().min(0).max(100).nullable(),
72046
72170
  /** Current error code (0 / null = no error). */
@@ -72102,35 +72226,14 @@ var vacuumControlCapability = {
72102
72226
  */
72103
72227
  durability: "session",
72104
72228
  /**
72105
- * History (D850): recorded series. Tank levels are fixed-object paths (`cleanWater.level`, ...).
72229
+ * History (D850): recorded series. The tanks moved to `consumables` (D915), whose
72230
+ * items are keyed by runtime ids and record no history.
72106
72231
  */
72107
- history: { fields: {
72108
- batteryLevel: {
72109
- kind: "gauge",
72110
- unit: "%",
72111
- deadband: 2
72112
- },
72113
- "cleanWater.level": {
72114
- kind: "gauge",
72115
- unit: "%",
72116
- deadband: 2
72117
- },
72118
- "dirtyWater.level": {
72119
- kind: "gauge",
72120
- unit: "%",
72121
- deadband: 2
72122
- },
72123
- "detergent.level": {
72124
- kind: "gauge",
72125
- unit: "%",
72126
- deadband: 2
72127
- },
72128
- "dustBin.level": {
72129
- kind: "gauge",
72130
- unit: "%",
72131
- deadband: 2
72132
- }
72133
- } }
72232
+ history: { fields: { batteryLevel: {
72233
+ kind: "gauge",
72234
+ unit: "%",
72235
+ deadband: 2
72236
+ } } }
72134
72237
  };
72135
72238
  /**
72136
72239
  * Pipe / water / gas valve cap. Models HA `valve.*` entities — anything
@@ -76899,6 +77002,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
76899
77002
  addonId: null,
76900
77003
  access: "create"
76901
77004
  },
77005
+ "deviceHistory.deleteOrphanSeries": {
77006
+ capName: "device-history",
77007
+ capScope: "system",
77008
+ addonId: null,
77009
+ access: "delete"
77010
+ },
76902
77011
  "deviceHistory.getDeviceEnabled": {
76903
77012
  capName: "device-history",
76904
77013
  capScope: "system",
@@ -76917,6 +77026,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
76917
77026
  addonId: null,
76918
77027
  access: "view"
76919
77028
  },
77029
+ "deviceHistory.listOrphanSeries": {
77030
+ capName: "device-history",
77031
+ capScope: "system",
77032
+ addonId: null,
77033
+ access: "view"
77034
+ },
76920
77035
  "deviceHistory.listSeries": {
76921
77036
  capName: "device-history",
76922
77037
  capScope: "system",
@@ -86942,7 +87057,7 @@ var SESSION_ONLY_POLICY = {
86942
87057
  };
86943
87058
  /**
86944
87059
  * Cap history catalog, projected from every `*.cap.ts` `history` block.
86945
- * 40 caps with series (77 series), 31 caps answered `'none'`.
87060
+ * 40 caps with series (73 series), 30 caps answered `'none'`.
86946
87061
  * Field keys are `runtimeState` paths (`a.b` into fixed objects only).
86947
87062
  */
86948
87063
  var HISTORY_CATALOG = {
@@ -87245,33 +87360,11 @@ var HISTORY_CATALOG = {
87245
87360
  unit: "°C",
87246
87361
  deadband: .1
87247
87362
  } },
87248
- "vacuum-control": {
87249
- "batteryLevel": {
87250
- kind: "gauge",
87251
- unit: "%",
87252
- deadband: 2
87253
- },
87254
- "cleanWater.level": {
87255
- kind: "gauge",
87256
- unit: "%",
87257
- deadband: 2
87258
- },
87259
- "dirtyWater.level": {
87260
- kind: "gauge",
87261
- unit: "%",
87262
- deadband: 2
87263
- },
87264
- "detergent.level": {
87265
- kind: "gauge",
87266
- unit: "%",
87267
- deadband: 2
87268
- },
87269
- "dustBin.level": {
87270
- kind: "gauge",
87271
- unit: "%",
87272
- deadband: 2
87273
- }
87274
- },
87363
+ "vacuum-control": { "batteryLevel": {
87364
+ kind: "gauge",
87365
+ unit: "%",
87366
+ deadband: 2
87367
+ } },
87275
87368
  "valve": { "position": {
87276
87369
  kind: "gauge",
87277
87370
  unit: "%",
@@ -87313,6 +87406,41 @@ var HISTORY_CATALOG = {
87313
87406
  }
87314
87407
  }
87315
87408
  };
87409
+ /**
87410
+ * Keyed-array series (D917), projected from every `history.items` block:
87411
+ * 1 caps (3 item fields). The item key is the series SCOPE;
87412
+ * the series key is `cap:<capName>.<path>[].<field>`.
87413
+ */
87414
+ var HISTORY_ITEM_CATALOG = { "consumables": {
87415
+ path: "items",
87416
+ key: "key",
87417
+ label: "label",
87418
+ fields: {
87419
+ "level": {
87420
+ kind: "gauge",
87421
+ unit: "%",
87422
+ deadband: 2,
87423
+ displayName: "Level"
87424
+ },
87425
+ "status": {
87426
+ kind: "enum",
87427
+ displayName: "Status",
87428
+ values: [
87429
+ "ok",
87430
+ "low",
87431
+ "empty",
87432
+ "full",
87433
+ "replace"
87434
+ ]
87435
+ },
87436
+ "remaining.value": {
87437
+ kind: "gauge",
87438
+ unitFrom: "remaining.unit",
87439
+ deadband: 1,
87440
+ displayName: "Remaining"
87441
+ }
87442
+ }
87443
+ } };
87316
87444
  var G711_SCALE_CORRECTION_DB = {
87317
87445
  PCMU: 20 * Math.log10(4),
87318
87446
  PCMA: 20 * Math.log10(8)
@@ -87915,7 +88043,7 @@ var STATE_SUMMARY_VARS = [
87915
88043
  ([...RULE_TEXT], [...COMBINED_ALARM]),
87916
88044
  ([...RULE_TEXT], [...DEVICE_EVENTS]),
87917
88045
  ([...RULE_TEXT], [...BATTERY, ...CONSUMABLE]),
87918
- ([...RULE_TEXT], [...CONSUMABLE]),
88046
+ ([...RULE_TEXT], [...CONSUMABLE, ...TANK]),
87919
88047
  ([...RULE_TEXT], [...TANK]),
87920
88048
  [...RULE_TEXT],
87921
88049
  ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
@@ -89331,6 +89459,12 @@ Object.defineProperty(exports, "HISTORY_DEFAULT_MIN_INTERVAL_MS", {
89331
89459
  return HISTORY_DEFAULT_MIN_INTERVAL_MS;
89332
89460
  }
89333
89461
  });
89462
+ Object.defineProperty(exports, "HISTORY_ITEM_CATALOG", {
89463
+ enumerable: true,
89464
+ get: function() {
89465
+ return HISTORY_ITEM_CATALOG;
89466
+ }
89467
+ });
89334
89468
  Object.defineProperty(exports, "HUB_MDNS_SERVICE_TYPE", {
89335
89469
  enumerable: true,
89336
89470
  get: function() {
@@ -90153,6 +90287,12 @@ Object.defineProperty(exports, "gbToBytes", {
90153
90287
  return gbToBytes;
90154
90288
  }
90155
90289
  });
90290
+ Object.defineProperty(exports, "historyItemFieldPath", {
90291
+ enumerable: true,
90292
+ get: function() {
90293
+ return historyItemFieldPath;
90294
+ }
90295
+ });
90156
90296
  Object.defineProperty(exports, "hydrateSchema", {
90157
90297
  enumerable: true,
90158
90298
  get: function() {
@@ -1,5 +1,5 @@
1
1
  require("./chunk-Cek0wNdY.js");
2
- const require_wal_maintenance = require("./wal-maintenance-B6LSQ_OZ.js");
2
+ const require_wal_maintenance = require("./wal-maintenance-EK28XXnc.js");
3
3
  let node_worker_threads = require("node:worker_threads");
4
4
  //#region src/builtins/sqlite-storage/file-host-worker.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { C as RecordsEngine, D as callVector, E as callRecords, O as controlTargetOf, T as callData, _ as collectTransferables, a as WalMaintenance, b as isFileHostWorkerData, h as serializeError, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, w as callControl, x as trustInput, y as isFileHostRequest } from "./wal-maintenance-BXYwFecW.mjs";
1
+ import { C as RecordsEngine, D as callVector, E as callRecords, O as controlTargetOf, T as callData, _ as collectTransferables, a as WalMaintenance, b as isFileHostWorkerData, h as serializeError, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, w as callControl, x as trustInput, y as isFileHostRequest } from "./wal-maintenance-DeluFl_1.mjs";
2
2
  import { parentPort, threadId, workerData } from "node:worker_threads";
3
3
  //#region src/builtins/sqlite-storage/file-host-worker.ts
4
4
  /**
@@ -1,7 +1,7 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-l6zKmHEb.js");
2
+ const require_dist = require("./dist-DuBtzSCh.js");
3
3
  const require_x509_es = require("./x509.es-C4cOo48M.js");
4
- const require_agent_https = require("./agent-https-DJ8OzQOr.js");
4
+ const require_agent_https = require("./agent-https-5OgOR-eF.js");
5
5
  let node_crypto = require("node:crypto");
6
6
  let _camstack_types_node = require("@camstack/types/node");
7
7
  let node_fs_promises = require("node:fs/promises");
@@ -1,7 +1,7 @@
1
1
  import { o as __toESM } from "./chunk-CNf5ZN-e.mjs";
2
- import { Ca as userError } from "./dist-BpUtAgqR.mjs";
2
+ import { Ta as userError } from "./dist-CtVVtyTX.mjs";
3
3
  import { f as X509Certificate$1 } from "./x509.es-DK__ETIe.mjs";
4
- import { D as reasonRequiresNewCa, E as evaluateExistingCert, F as readNameConstraints, N as permitsIdentity, _ as issueLeaf, b as collectCertIdentity, g as generateCa, j as isConstrainedCa, v as loadCa, y as localCaCommonName } from "./agent-https-DR1wmhYY.mjs";
4
+ import { D as reasonRequiresNewCa, E as evaluateExistingCert, F as readNameConstraints, N as permitsIdentity, _ as issueLeaf, b as collectCertIdentity, g as generateCa, j as isConstrainedCa, v as loadCa, y as localCaCommonName } from "./agent-https-b-zX78oB.mjs";
5
5
  import { X509Certificate, createPrivateKey } from "node:crypto";
6
6
  import { writeOwnerOnlyFileSync } from "@camstack/types/node";
7
7
  import { mkdir, writeFile } from "node:fs/promises";
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("./chunk-Cek0wNdY.js");
3
- const require_dist = require("./dist-l6zKmHEb.js");
4
- const require_device_ca = require("./device-ca-CGcaSheI.js");
3
+ const require_dist = require("./dist-DuBtzSCh.js");
4
+ const require_device_ca = require("./device-ca-CC58lmNV.js");
5
5
  const require_read_all_rows$1 = require("./read-all-rows-CVoO1ONM.js");
6
6
  const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
7
7
  require("./builtins/alerts/index.js");
@@ -26,21 +26,21 @@ const require_builtins_loki_logging_index = require("./builtins/loki-logging/ind
26
26
  const require_builtins_native_metrics_native_metrics_addon = require("./builtins/native-metrics/native-metrics.addon.js");
27
27
  const require_builtins_device_history_device_history_addon = require("./builtins/device-history/device-history.addon.js");
28
28
  const require_builtins_sqlite_storage_filesystem_storage_addon = require("./builtins/sqlite-storage/filesystem-storage.addon.js");
29
- const require_wal_maintenance = require("./wal-maintenance-B6LSQ_OZ.js");
29
+ const require_wal_maintenance = require("./wal-maintenance-EK28XXnc.js");
30
30
  const require_builtins_sqlite_storage_sqlite_settings_addon = require("./builtins/sqlite-storage/sqlite-settings.addon.js");
31
31
  const require_builtins_sqlite_storage_index = require("./builtins/sqlite-storage/index.js");
32
32
  const require_builtins_storage_orchestrator_storage_orchestrator_addon = require("./builtins/storage-orchestrator/storage-orchestrator.addon.js");
33
33
  require("./builtins/storage-orchestrator/index.js");
34
- const require_agent_https = require("./agent-https-DJ8OzQOr.js");
35
- const require_constants = require("./constants-CuO3rcw4.js");
34
+ const require_agent_https = require("./agent-https-5OgOR-eF.js");
35
+ const require_constants = require("./constants-2mPqJjkR.js");
36
36
  const require_builtins_system_config_system_config_addon = require("./builtins/system-config/system-config.addon.js");
37
37
  require("./builtins/system-config/index.js");
38
38
  const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
39
39
  const require_custom_action_registry = require("./custom-action-registry-MRyes5j0.js");
40
- const require_hub_mdns_ciao = require("./hub-mdns-ciao-CIno_SNn.js");
40
+ const require_hub_mdns_ciao = require("./hub-mdns-ciao-BLsX_2cL.js");
41
41
  const require_platform_key_source = require("./platform-key-source-Di7HrlGR.js");
42
42
  const require_resource_monitor = require("./resource-monitor-mio9dSCT.js");
43
- const require_restore_archive = require("./restore-archive-B71JI-sP.js");
43
+ const require_restore_archive = require("./restore-archive-CxPAuaNs.js");
44
44
  const require_coral_accelerators = require("./coral-accelerators-oUXmmbc2.js");
45
45
  let zod = require("zod");
46
46
  let node_crypto = require("node:crypto");