@camstack/server 1.2.832 → 1.2.834

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 (95) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/api/trpc/cap-router-runtime.js +16 -1
  3. package/dist/api/trpc/generated-cap-mounts.js +1 -2
  4. package/dist/api/trpc/generated-cap-routers.js +2132 -2183
  5. package/dist/core/addon/instance-lifecycle.js +21 -3
  6. package/package.json +8 -7
  7. package/system/dist/addon-utils.mjs +1 -1
  8. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  9. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +4 -4
  10. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  11. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +5 -5
  12. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  13. package/system/dist/builtins/alerts/alerts.addon.mjs +3 -3
  14. package/system/dist/builtins/autotrack/index.js +1 -1
  15. package/system/dist/builtins/autotrack/index.mjs +1 -1
  16. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  17. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -5
  18. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  19. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  20. package/system/dist/builtins/camera-grid/index.js +1 -1
  21. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  22. package/system/dist/builtins/composer/composer.addon.js +4 -4
  23. package/system/dist/builtins/composer/composer.addon.mjs +4 -4
  24. package/system/dist/builtins/console-logging/index.js +1 -1
  25. package/system/dist/builtins/console-logging/index.mjs +1 -1
  26. package/system/dist/builtins/core-blocks/core-blocks.addon.js +3 -3
  27. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +3 -3
  28. package/system/dist/builtins/device-history/capture/device-directory.d.ts +1 -1
  29. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  30. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  31. package/system/dist/builtins/device-manager/device-manager.addon.js +2 -2
  32. package/system/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  33. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  34. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  35. package/system/dist/builtins/keychain/index.js +4 -4
  36. package/system/dist/builtins/keychain/index.mjs +4 -4
  37. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  38. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  39. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  40. package/system/dist/builtins/local-auth/local-auth.addon.mjs +5 -5
  41. package/system/dist/builtins/local-network/local-network.addon.js +3 -3
  42. package/system/dist/builtins/local-network/local-network.addon.mjs +3 -3
  43. package/system/dist/builtins/loki-logging/index.js +1 -1
  44. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  45. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  46. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
  47. package/system/dist/builtins/platform-probe/index.js +1 -1
  48. package/system/dist/builtins/platform-probe/index.mjs +10 -10
  49. package/system/dist/builtins/record-entries/index.js +1 -1
  50. package/system/dist/builtins/record-entries/index.mjs +1 -1
  51. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  52. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  53. package/system/dist/builtins/snapshot/index.js +1 -1
  54. package/system/dist/builtins/snapshot/index.mjs +1 -1
  55. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  56. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
  57. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  58. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  59. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
  60. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
  61. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  62. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  63. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  64. package/system/dist/builtins/system-config/system-config.addon.mjs +115 -115
  65. package/system/dist/builtins/winston-logging/index.js +1 -1
  66. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  67. package/system/dist/{capture-engine-D8AiIjQC.mjs → capture-engine-BQjIa865.mjs} +3 -3
  68. package/system/dist/{capture-engine-CAXBK7ww.js → capture-engine-Bgml6l8Z.js} +3 -3
  69. package/system/dist/{composition-sources-BunkRPGS.js → composition-sources-C7hUy8w0.js} +1 -1
  70. package/system/dist/{composition-sources-UhXWDHi8.mjs → composition-sources-CrL4KcSA.mjs} +1 -1
  71. package/system/dist/{constants-C0KB1WOf.mjs → constants-Bw5qtfbX.mjs} +1 -1
  72. package/system/dist/{constants-B5QCyskv.js → constants-CUAo3cLm.js} +1 -1
  73. package/system/dist/{coral-accelerators-BW3OcrLD.mjs → coral-accelerators-DBlgWB8k.mjs} +6 -6
  74. package/system/dist/{custom-action-registry-N7flBDwT.mjs → custom-action-registry-B9zFBNVa.mjs} +37 -37
  75. package/system/dist/{device-ca-I_cMOy9W.mjs → device-ca-BDmoMgA3.mjs} +1 -1
  76. package/system/dist/{device-ca-DJNiUFgb.js → device-ca-YELIR9gF.js} +1 -1
  77. package/system/dist/{dist-BObCeiJC.js → dist-D3_60xED.js} +48 -232
  78. package/system/dist/{dist-BkjJt6LD.mjs → dist-yQfQUpYA.mjs} +48 -232
  79. package/system/dist/file-host-worker.js +1 -1
  80. package/system/dist/file-host-worker.mjs +1 -1
  81. package/system/dist/{hub-identity-Db2RwtZ2.mjs → hub-identity-C8FGw7Mt.mjs} +10 -10
  82. package/system/dist/{hub-identity-QhEXr2sn.js → hub-identity-c_zPVKOY.js} +1 -1
  83. package/system/dist/{hub-mdns-ciao-DJYolZOM.mjs → hub-mdns-ciao-CM64AtFQ.mjs} +2 -2
  84. package/system/dist/{hub-mdns-ciao-L9Qt3eVs.js → hub-mdns-ciao-CaWa1FY1.js} +2 -2
  85. package/system/dist/index.js +12 -10
  86. package/system/dist/index.mjs +223 -221
  87. package/system/dist/{legacy-integration-rows-door-4SwHHOO6.js → legacy-integration-rows-door-BnEJMuwz.js} +1 -1
  88. package/system/dist/{legacy-integration-rows-door-tl15MjSN.mjs → legacy-integration-rows-door-D5Qe0A95.mjs} +1 -1
  89. package/system/dist/{rename-composition-block-BRlgC6CC.js → rename-composition-block-CbAR4yC9.js} +1 -1
  90. package/system/dist/{rename-composition-block-DunKva8Y.mjs → rename-composition-block-DXN1dVXs.mjs} +1 -1
  91. package/system/dist/{restore-archive-WeQO8IMV.mjs → restore-archive-C88Ee7w9.mjs} +94 -94
  92. package/system/dist/{restore-archive-DDeWKKhR.js → restore-archive-DDzgcjNf.js} +1 -1
  93. package/system/dist/{wal-maintenance-CXx0PMNE.js → wal-maintenance-BNN52u-q.js} +0 -0
  94. package/system/dist/{wal-maintenance-7Zug5GTs.mjs → wal-maintenance-EvgkvDZK.mjs} +0 -0
  95. package/system/package.json +1 -1
@@ -803,7 +803,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
803
803
  return EventCategory;
804
804
  }({});
805
805
  //#endregion
806
- //#region ../types/dist/composed-stable-id-jnvhwGoH.mjs
806
+ //#region ../types/dist/composed-stable-id-DFNyOFzz.mjs
807
807
  /**
808
808
  import { errMsg } from '@camstack/types'
809
809
  * Extract a human-readable message from an unknown error value.
@@ -816,6 +816,7 @@ function errMsg(err) {
816
816
  }
817
817
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
818
818
  DeviceType["Camera"] = "camera";
819
+ /** Legacy stored value, read only by the hub-to-integration migrations; no live device carries it. */
819
820
  DeviceType["Hub"] = "hub";
820
821
  DeviceType["Light"] = "light";
821
822
  DeviceType["Siren"] = "siren";
@@ -1225,7 +1226,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
1225
1226
  */
1226
1227
  var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
1227
1228
  //#endregion
1228
- //#region ../types/dist/sleep-Cw1uUXvl.mjs
1229
+ //#region ../types/dist/sleep-D_NpiLFP.mjs
1229
1230
  /**
1230
1231
  * The audio chunk plane's byte format, and the ONE expansion from a coded
1231
1232
  * window to float samples (D455).
@@ -9860,10 +9861,6 @@ var CAMERA_CAP_VOCABULARY = {
9860
9861
  scope: "device",
9861
9862
  noun: t("Admin link", "Link di amministrazione")
9862
9863
  },
9863
- "device-discovery": {
9864
- scope: "device",
9865
- noun: t("Discovery", "Rilevamento dispositivi")
9866
- },
9867
9864
  "device-extension": {
9868
9865
  scope: "device",
9869
9866
  noun: t("Device extension", "Estensione del dispositivo")
@@ -11641,7 +11638,6 @@ var CAP_NAMES = Object.freeze([
11641
11638
  "device-admin-link",
11642
11639
  "device-adoption",
11643
11640
  "device-credentials",
11644
- "device-discovery",
11645
11641
  "device-export",
11646
11642
  "device-extension",
11647
11643
  "device-history",
@@ -12263,13 +12259,6 @@ Object.freeze({
12263
12259
  "valueType": "string"
12264
12260
  }
12265
12261
  ],
12266
- "device-discovery": [{
12267
- "path": "lastDiscoveryAt",
12268
- "valueType": "number"
12269
- }, {
12270
- "path": "lastError",
12271
- "valueType": "string"
12272
- }],
12273
12262
  "device-export": [
12274
12263
  {
12275
12264
  "path": "linkState",
@@ -13860,7 +13849,7 @@ function sleep(ms) {
13860
13849
  return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
13861
13850
  }
13862
13851
  //#endregion
13863
- //#region ../types/dist/implemented-methods-OitwyO1Y.mjs
13852
+ //#region ../types/dist/implemented-methods-M5aguGon.mjs
13864
13853
  var AUDIO_ENCODER_BY_CODEC = {
13865
13854
  opus: "libopus",
13866
13855
  aac: "aac",
@@ -46114,7 +46103,6 @@ var accessoriesCapability = {
46114
46103
  mode: "singleton",
46115
46104
  deviceTypes: [
46116
46105
  DeviceType.Camera,
46117
- DeviceType.Hub,
46118
46106
  DeviceType.Switch,
46119
46107
  DeviceType.Light,
46120
46108
  DeviceType.Sensor,
@@ -53648,7 +53636,6 @@ var CAP_CUSTOMIZE_CATALOG = {
53648
53636
  cardinality: "scalar",
53649
53637
  deviceTypes: [
53650
53638
  DeviceType.Gateway,
53651
- DeviceType.Hub,
53652
53639
  DeviceType.Camera,
53653
53640
  DeviceType.Sensor,
53654
53641
  DeviceType.MediaPlayer,
@@ -54859,7 +54846,7 @@ async function runFanOut(calls, invoke) {
54859
54846
  }
54860
54847
  /**
54861
54848
  * Cap history catalog, projected from every `*.cap.ts` `history` block.
54862
- * 44 caps with series (87 series), 37 caps answered `'none'`.
54849
+ * 44 caps with series (89 series), 36 caps answered `'none'`.
54863
54850
  * Field keys are `runtimeState` paths (`a.b` into fixed objects only).
54864
54851
  */
54865
54852
  var HISTORY_CATALOG = {
@@ -55135,6 +55122,8 @@ var HISTORY_CATALOG = {
55135
55122
  minIntervalMs: 3e4
55136
55123
  } },
55137
55124
  "pet-feeder": {
55125
+ "feeding": { kind: "boolean" },
55126
+ "eating": { kind: "boolean" },
55138
55127
  "foodLevel": { kind: "gauge" },
55139
55128
  "bowlFood": { kind: "gauge" },
55140
55129
  "food1": { kind: "gauge" },
@@ -57938,27 +57927,35 @@ var deviceAdminLinkCapability = {
57938
57927
  getAdminLink: method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), DeviceAdminLinkSchema.nullable(), { auth: "admin" }) }
57939
57928
  };
57940
57929
  /**
57941
- * device-discovery — device-scoped capability for parents that host /
57942
- * enumerate child devices (Reolink Hub / NVR, ONVIF gateway, future
57943
- * integrations). The parent advertises a list of discoverable children,
57944
- * and the operator promotes a subset to real devices via `adoptDevice`.
57945
- * Child lifecycle (kernel device create/remove, parent reference) is
57946
- * owned by the framework so a single shared `<DiscoveryPanel />` can
57947
- * drive any integration.
57948
- *
57949
- * Boundaries:
57950
- * - The cap exposes ENUMERATION + ADOPT/RELEASE only. The protocol
57951
- * used to discover children (CGI poll, mDNS, push from hub, ...)
57952
- * is the integration's business; results land in `runtimeState`
57953
- * so the panel can render without a fresh round-trip.
57954
- * - `childNativeId` is integration-defined and must be stable across
57955
- * reboots so re-discovery doesn't duplicate adopted children.
57956
- * - `adoptDevice` returns the new `deviceId` so the UI can navigate
57957
- * directly to the freshly-created child's settings page.
57958
- */
57959
- /**
57960
- * Status enum for a discovered device. Mirrors the Reolink simpleEvent
57961
- * lifecycle (`online` / `sleeping` / `offline`) — generic enough for
57930
+ * `device-adoption` — generic discovery + adoption surface,
57931
+ * system-scoped collection (one provider per integration addon), routed
57932
+ * by explicit `{ addonId }` on direct `deviceAdoption.*` calls — the same
57933
+ * pin model as `connection-test`. The admin UI keeps using
57934
+ * `deviceManager.adoption*` (which already threads `addonId`). The de-HA-ified
57935
+ * successor to `ha-discovery`:
57936
+ * keyed by `integrationId` (the addon resolves integrationId → broker
57937
+ * internally) rather than a connection-specific `brokerId`, and it
57938
+ * OWNS the shared `DiscoveredChildDevice` candidate type
57939
+ * (declared below) so a single shared adoption modal renders any integration's
57940
+ * candidate tree.
57941
+ *
57942
+ * UI flow (Integrations page → integration detail):
57943
+ * 1. `listCandidates({integrationId, page, pageSize, filter})` →
57944
+ * paginated candidate list, each row collapsed.
57945
+ * 2. User expands a row → `getCandidate({integrationId,
57946
+ * childNativeId})` returns the single candidate (with its nested
57947
+ * `children`) for the accordion render.
57948
+ * 3. User clicks "Adopt" on one or more candidates →
57949
+ * `adopt({integrationId, childNativeIds, perCandidate?})`
57950
+ * materialises one parent CamStack device per candidate plus its
57951
+ * accessory children. `perCandidate[childNativeId]` carries an
57952
+ * optional display-name override + a `hiddenChildIds` pre-hide set
57953
+ * (the parent's `accessories.hiddenChildIds` gates UI visibility).
57954
+ * 4. User clicks "Release" → `release({integrationId, camDeviceId})`
57955
+ * removes the parent + every child from the kernel registry.
57956
+ */
57957
+ /**
57958
+ * Status enum for a discovered device. Generic enough for
57962
57959
  * battery cams, awake cams, and unreachable cams alike.
57963
57960
  */
57964
57961
  var DiscoveredChildStatusSchema = zod.z.enum([
@@ -57975,12 +57972,12 @@ var DiscoveredChildDeviceSchema = zod.z.lazy(() => zod.z.object({
57975
57972
  /** DeviceType the child should be created with on adopt. */
57976
57973
  type: zod.z.enum(DeviceType),
57977
57974
  status: DiscoveredChildStatusSchema,
57978
- /** Free-form integration-specific metadata surfaced in the panel. */
57975
+ /** Free-form integration-specific metadata surfaced in the adoption modal. */
57979
57976
  metadata: zod.z.object({
57980
57977
  model: zod.z.string().optional(),
57981
57978
  serialNumber: zod.z.string().optional(),
57982
57979
  uid: zod.z.string().optional(),
57983
- /** Reolink: 0-based channel index inside the parent NVR/Hub. */
57980
+ /** Reolink: 0-based channel index inside the parent NVR. */
57984
57981
  rtspChannel: zod.z.number().int().nonnegative().optional(),
57985
57982
  isBattery: zod.z.boolean().optional(),
57986
57983
  isDoorbell: zod.z.boolean().optional(),
@@ -57996,137 +57993,24 @@ var DiscoveredChildDeviceSchema = zod.z.lazy(() => zod.z.object({
57996
57993
  }).default({}),
57997
57994
  /**
57998
57995
  * `true` when the framework already created a child device for this
57999
- * `childNativeId` under the current parent. The panel uses it to
57996
+ * `childNativeId` under the current parent. The adoption modal uses it to
58000
57997
  * gate the Add/Remove button and surface the existing `deviceId`.
58001
57998
  */
58002
57999
  alreadyAdopted: zod.z.boolean(),
58003
58000
  /** When `alreadyAdopted=true`, the framework-assigned child device id. */
58004
58001
  adoptedDeviceId: zod.z.number().int().nonnegative().nullable(),
58005
- /** Capability names the candidate advertises — integrations populate, Hubs omit. */
58002
+ /** Capability names the candidate advertises — integrations populate, flat enumerations omit. */
58006
58003
  capabilities: zod.z.array(zod.z.string()).readonly().optional(),
58007
- /** Feature flags the candidate advertises — integrations populate, Hubs omit. */
58004
+ /** Feature flags the candidate advertises — integrations populate, flat enumerations omit. */
58008
58005
  features: zod.z.array(zod.z.string()).readonly().optional(),
58009
58006
  /** Upstream-system identity + rendering hints for the candidate. */
58010
58007
  sourceInfo: SourceInfoSchema.optional(),
58011
- /** Nested entity-children for accordion preview — integrations populate, Hubs omit. */
58008
+ /** Nested entity-children for accordion preview — integrations populate, flat enumerations omit. */
58012
58009
  children: zod.z.array(DiscoveredChildDeviceSchema).readonly().optional(),
58013
58010
  /** `childNativeId` of the gateway candidate in the same list this device sits behind. */
58014
58011
  parentStableId: zod.z.string().optional()
58015
58012
  }));
58016
58013
  /**
58017
- * Status block — populated by the integration after each
58018
- * `refreshDiscovery` (or push-driven update). The runtime-state slice
58019
- * is what the panel reads via the per-device proxy; `getStatus`
58020
- * returns the same payload via the codegen'd auto-injection.
58021
- */
58022
- var DeviceDiscoveryStatusSchema = zod.z.object({
58023
- discovered: zod.z.array(DiscoveredChildDeviceSchema),
58024
- /** Wall-clock ms of the last successful enumeration. */
58025
- lastDiscoveryAt: zod.z.number().int().nonnegative().nullable(),
58026
- /** Last error surfaced from the source (rendered as a banner). */
58027
- lastError: zod.z.string().nullable()
58028
- });
58029
- var deviceDiscoveryCapability = {
58030
- name: "device-discovery",
58031
- scope: "device",
58032
- deviceNative: true,
58033
- mode: "singleton",
58034
- deviceTypes: [DeviceType.Hub],
58035
- status: {
58036
- schema: DeviceDiscoveryStatusSchema,
58037
- kind: "poll"
58038
- },
58039
- runtimeState: DeviceDiscoveryStatusSchema.extend({ lastFetchedAt: zod.z.number().int().nonnegative() }),
58040
- /**
58041
- * Runtime-state durability: **session** — 5.7 KB of scan output on the largest device, fully re-derivable by re-scanning.
58042
- *
58043
- * See `RuntimeStateDurability`. Enforced by
58044
- * `scripts/check-runtime-state-durability.ts`.
58045
- */
58046
- durability: "session",
58047
- /**
58048
- * History (D850): none — inventory.
58049
- */
58050
- history: "none",
58051
- methods: {
58052
- /**
58053
- * Snapshot of the current `discovered` list. Returns the
58054
- * runtime-state cache — call `refreshDiscovery` first if a
58055
- * fresh round-trip to the source is required.
58056
- */
58057
- listDiscovered: method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.array(DiscoveredChildDeviceSchema).readonly()),
58058
- /**
58059
- * Force the integration to re-enumerate and update the
58060
- * runtime-state slice. Returns the freshly-enumerated list (also
58061
- * available via `listDiscovered` post-call).
58062
- */
58063
- refreshDiscovery: method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.array(DiscoveredChildDeviceSchema).readonly(), {
58064
- kind: "mutation",
58065
- auth: "admin"
58066
- }),
58067
- /**
58068
- * Promote a discovered entry to a real child device. The framework
58069
- * creates the child via `kernel.devices.create()` with
58070
- * `parentDeviceId = parent.id` and seeds the child's config from
58071
- * `childInitialConfig` (driver-defined; usually carries channel +
58072
- * uid + parent reference). Returns the kernel-assigned numeric id.
58073
- */
58074
- adoptDevice: method(zod.z.object({
58075
- deviceId: zod.z.number().int().nonnegative(),
58076
- childNativeId: zod.z.string(),
58077
- /** Optional override for the child's display name. */
58078
- name: zod.z.string().optional()
58079
- }), zod.z.object({
58080
- deviceId: zod.z.number().int().nonnegative(),
58081
- stableId: zod.z.string()
58082
- }), {
58083
- kind: "mutation",
58084
- auth: "admin"
58085
- }),
58086
- /**
58087
- * Inverse of `adoptDevice`: removes the child device from the
58088
- * kernel registry. The discovered entry remains in the
58089
- * enumeration (status updates resume) so the operator can re-adopt
58090
- * it later without a fresh refresh.
58091
- */
58092
- releaseDevice: method(zod.z.object({
58093
- deviceId: zod.z.number().int().nonnegative(),
58094
- childDeviceId: zod.z.number().int().nonnegative()
58095
- }), zod.z.void(), {
58096
- kind: "mutation",
58097
- auth: "admin"
58098
- })
58099
- }
58100
- };
58101
- /**
58102
- * `device-adoption` — generic discovery + adoption surface,
58103
- * system-scoped collection (one provider per integration addon), routed
58104
- * by explicit `{ addonId }` on direct `deviceAdoption.*` calls — the same
58105
- * pin model as `connection-test`. The admin UI keeps using
58106
- * `deviceManager.adoption*` (which already threads `addonId`). The de-HA-ified
58107
- * successor to `ha-discovery`:
58108
- * keyed by `integrationId` (the addon resolves integrationId → broker
58109
- * internally) rather than a connection-specific `brokerId`, and it
58110
- * REUSES the shared `DiscoveredChildDevice` candidate type from
58111
- * `device-discovery.cap.ts` so a single shared adoption panel renders
58112
- * any integration's candidate tree.
58113
- *
58114
- * UI flow (Integrations page → integration detail):
58115
- * 1. `listCandidates({integrationId, page, pageSize, filter})` →
58116
- * paginated candidate list, each row collapsed.
58117
- * 2. User expands a row → `getCandidate({integrationId,
58118
- * childNativeId})` returns the single candidate (with its nested
58119
- * `children`) for the accordion render.
58120
- * 3. User clicks "Adopt" on one or more candidates →
58121
- * `adopt({integrationId, childNativeIds, perCandidate?})`
58122
- * materialises one parent CamStack device per candidate plus its
58123
- * accessory children. `perCandidate[childNativeId]` carries an
58124
- * optional display-name override + a `hiddenChildIds` pre-hide set
58125
- * (the parent's `accessories.hiddenChildIds` gates UI visibility).
58126
- * 4. User clicks "Release" → `release({integrationId, camDeviceId})`
58127
- * removes the parent + every child from the kernel registry.
58128
- */
58129
- /**
58130
58014
  * Provider-declared discovery *granularity* filter (the keystone of the
58131
58015
  * single-entity-import design). A provider advertises which discovery
58132
58016
  * granularities it supports via `listCandidateFilters`; the operator picks
@@ -82180,9 +82064,13 @@ var petFeederCapability = {
82180
82064
  */
82181
82065
  durability: "session",
82182
82066
  /**
82183
- * History (D850): recorded series.
82067
+ * History (D850): recorded series. `feeding` / `eating` are the meals the
82068
+ * device hero's "Meals" button names — change-only booleans, so a dispense
82069
+ * or a pet at the bowl is one span on the history.
82184
82070
  */
82185
82071
  history: { fields: {
82072
+ feeding: { kind: "boolean" },
82073
+ eating: { kind: "boolean" },
82186
82074
  foodLevel: { kind: "gauge" },
82187
82075
  bowlFood: { kind: "gauge" },
82188
82076
  food1: { kind: "gauge" },
@@ -84535,7 +84423,6 @@ var PowerSourceStateSchema = zod.z.object({
84535
84423
  });
84536
84424
  var POWER_SOURCE_DEVICE_TYPES = [
84537
84425
  DeviceType.Gateway,
84538
- DeviceType.Hub,
84539
84426
  DeviceType.Camera,
84540
84427
  DeviceType.Sensor,
84541
84428
  DeviceType.MediaPlayer,
@@ -95551,7 +95438,6 @@ var ALL_CAPABILITY_DEFINITIONS = [
95551
95438
  deviceAdminLinkCapability,
95552
95439
  deviceAdoptionCapability,
95553
95440
  deviceCredentialsCapability,
95554
- deviceDiscoveryCapability,
95555
95441
  deviceExportCapability,
95556
95442
  deviceExtensionCapability,
95557
95443
  deviceHistoryCapability,
@@ -98120,7 +98006,6 @@ var DEVICE_LOCAL_STATE_CAPS = {
98120
98006
  control: controlCapability,
98121
98007
  cover: coverCapability,
98122
98008
  dayNight: dayNightCapability,
98123
- deviceDiscovery: deviceDiscoveryCapability,
98124
98009
  deviceStatus: deviceStatusCapability,
98125
98010
  dishwasher: dishwasherCapability,
98126
98011
  doNotDisturb: doNotDisturbCapability,
@@ -105067,41 +104952,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
105067
104952
  access: "create",
105068
104953
  role: "admin"
105069
104954
  },
105070
- "deviceDiscovery.adoptDevice": {
105071
- capName: "device-discovery",
105072
- capScope: "device",
105073
- addonId: null,
105074
- access: "create",
105075
- role: "admin"
105076
- },
105077
- "deviceDiscovery.getStatus": {
105078
- capName: "device-discovery",
105079
- capScope: "device",
105080
- addonId: null,
105081
- access: "view",
105082
- role: "viewer"
105083
- },
105084
- "deviceDiscovery.listDiscovered": {
105085
- capName: "device-discovery",
105086
- capScope: "device",
105087
- addonId: null,
105088
- access: "view",
105089
- role: "viewer"
105090
- },
105091
- "deviceDiscovery.refreshDiscovery": {
105092
- capName: "device-discovery",
105093
- capScope: "device",
105094
- addonId: null,
105095
- access: "create",
105096
- role: "admin"
105097
- },
105098
- "deviceDiscovery.releaseDevice": {
105099
- capName: "device-discovery",
105100
- capScope: "device",
105101
- addonId: null,
105102
- access: "create",
105103
- role: "admin"
105104
- },
105105
104955
  "deviceExport.applyDeviceSettingsPatch": {
105106
104956
  capName: "device-export",
105107
104957
  capScope: "system",
@@ -113911,7 +113761,6 @@ var CAP_NAMES_WITH_STATUS = [
113911
113761
  "cover",
113912
113762
  "day-night",
113913
113763
  "device-adoption",
113914
- "device-discovery",
113915
113764
  "device-export",
113916
113765
  "device-status",
113917
113766
  "dishwasher",
@@ -114406,35 +114255,6 @@ Object.freeze({
114406
114255
  form: "single",
114407
114256
  optional: false
114408
114257
  }],
114409
- "deviceDiscovery.adoptDevice": [{
114410
- name: "deviceId",
114411
- form: "single",
114412
- optional: false
114413
- }],
114414
- "deviceDiscovery.getStatus": [{
114415
- name: "deviceId",
114416
- form: "single",
114417
- optional: false
114418
- }],
114419
- "deviceDiscovery.listDiscovered": [{
114420
- name: "deviceId",
114421
- form: "single",
114422
- optional: false
114423
- }],
114424
- "deviceDiscovery.refreshDiscovery": [{
114425
- name: "deviceId",
114426
- form: "single",
114427
- optional: false
114428
- }],
114429
- "deviceDiscovery.releaseDevice": [{
114430
- name: "childDeviceId",
114431
- form: "single",
114432
- optional: false
114433
- }, {
114434
- name: "deviceId",
114435
- form: "single",
114436
- optional: false
114437
- }],
114438
114258
  "deviceExport.applyDeviceSettingsPatch": [{
114439
114259
  name: "deviceId",
114440
114260
  form: "single",
@@ -117107,7 +116927,7 @@ Object.freeze({
117107
116927
  });
117108
116928
  /**
117109
116929
  * Per-cap runtime-state policy, projected from every `*.cap.ts` that declares
117110
- * `runtimeState`. 82 caps: 41 `restored`, 41 `session`.
116930
+ * `runtimeState`. 81 caps: 41 `restored`, 40 `session`.
117111
116931
  *
117112
116932
  * A cap absent from this map has no runtime-state slice at all. A cap PRESENT
117113
116933
  * with `durability: 'session'` has one and has decided not to keep it.
@@ -117186,10 +117006,6 @@ var RUNTIME_STATE_POLICY = {
117186
117006
  durability: "restored",
117187
117007
  volatileFields: ["lastFetchedAt"]
117188
117008
  },
117189
- "device-discovery": {
117190
- durability: "session",
117191
- volatileFields: []
117192
- },
117193
117009
  "device-status": {
117194
117010
  durability: "restored",
117195
117011
  volatileFields: ["lastChangedAt"]