@camstack/addon-provider-dreame 0.2.124 → 0.2.126

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 (3) hide show
  1. package/dist/addon.js +141 -24
  2. package/dist/addon.mjs +141 -24
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -58282,7 +58282,7 @@ var ZodIssueCode = {
58282
58282
  var ZodFirstPartyTypeKind;
58283
58283
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
58284
58284
  //#endregion
58285
- //#region ../types/dist/sleep-DXKLNFvA.mjs
58285
+ //#region ../types/dist/sleep-C16NCZR2.mjs
58286
58286
  /**
58287
58287
  * The audio chunk plane's byte format, and the ONE expansion from a coded
58288
58288
  * window to float samples (D455).
@@ -69139,6 +69139,12 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
69139
69139
  kind: "mutation",
69140
69140
  auth: "admin"
69141
69141
  });
69142
+ var HUB_ADDRESS_ROLES = [
69143
+ "appConnections",
69144
+ "notificationTaps",
69145
+ "internal",
69146
+ "publicEndpoint"
69147
+ ];
69142
69148
  function hostnameOf(baseUrl) {
69143
69149
  try {
69144
69150
  const host = new URL(baseUrl).hostname;
@@ -73360,7 +73366,13 @@ var NcAlarmModeDelaysListSchema = array(object({
73360
73366
  * Absent = false (logged, not sent). Even when true it is not sent when that same sensor
73361
73367
  * is the one that starts the entry delay — the entry-delay notification already names it.
73362
73368
  */
73363
- notifySensorRewatched: boolean().optional()
73369
+ notifySensorRewatched: boolean().optional(),
73370
+ /**
73371
+ * D735: notify "ignored" when a sensor this arm bypassed really MOVED while armed (its own
73372
+ * change time is after the arm) and set nothing off. Absent = false (logged, not sent). A
73373
+ * re-sync, a recovery from `unavailable` or a duplicate is never announced, switch or not.
73374
+ */
73375
+ notifySensorIgnored: boolean().optional()
73364
73376
  })).max(8).refine(uniqueModes, { message: "modeDelays: at most one entry per arm mode" });
73365
73377
  var NcAlarmModeDelaysEditListSchema = array(object({
73366
73378
  mode: AlarmArmModeSchema,
@@ -73373,7 +73385,9 @@ var NcAlarmModeDelaysEditListSchema = array(object({
73373
73385
  /** D706: set the switch, or `null` to clear it (back to the default, false). */
73374
73386
  notifyDuringEntryDelay: boolean().nullable().optional(),
73375
73387
  /** D706: set the switch, or `null` to clear it (back to the default, false). */
73376
- notifySensorRewatched: boolean().nullable().optional()
73388
+ notifySensorRewatched: boolean().nullable().optional(),
73389
+ /** D735: set the switch, or `null` to clear it (back to the default, false). */
73390
+ notifySensorIgnored: boolean().nullable().optional()
73377
73391
  })).max(8).refine(uniqueModes, { message: "modeDelays: at most one edit per arm mode" });
73378
73392
  /** One switch of the alarm table: put ONE device on, or take it off, ONE mode's list. */
73379
73393
  var NcAlarmNonBlockingEditSchema = object({
@@ -81194,6 +81208,14 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
81194
81208
  */
81195
81209
  alive: boolean()
81196
81210
  })), method(object({
81211
+ deviceId: number().int().nonnegative(),
81212
+ sessionId: string(),
81213
+ downlinkMbps: number().nonnegative()
81214
+ }), object({
81215
+ outcome: _enum(["switching", "held"]),
81216
+ tier: CamProfileSchema.nullable(),
81217
+ reason: string()
81218
+ }), { kind: "mutation" }), method(object({
81197
81219
  deviceId: number().int().nonnegative(),
81198
81220
  sessionId: string()
81199
81221
  }), WebrtcSessionDebugSchema, { kind: "query" });
@@ -85030,7 +85052,8 @@ var ConnectionEndpointSchema = object({
85030
85052
  "lan-ipv6",
85031
85053
  "public",
85032
85054
  "loopback",
85033
- "app-link"
85055
+ "app-link",
85056
+ "custom"
85034
85057
  ]),
85035
85058
  /**
85036
85059
  * Originating-interface kind — `lan`/`wifi`/`docker`/`vpn`/`other`/
@@ -85099,7 +85122,7 @@ var GetConnectionEndpointsResultSchema = object({
85099
85122
  localPort: AdvertisedLocalPortSchema
85100
85123
  });
85101
85124
  /**
85102
- * The address flagged for notification links. `baseUrl: null` = AUTO, which
85125
+ * The address flagged for notification taps (`notificationTaps`). `baseUrl: null` = AUTO, which
85103
85126
  * since D709 is the CamStack app link; `resolved` reports the effective value,
85104
85127
  * so the UI can show it either way.
85105
85128
  */
@@ -85133,13 +85156,12 @@ var ViewerEndpointsSchema = object({
85133
85156
  resolved: array(string()).readonly()
85134
85157
  });
85135
85158
  /**
85136
- * One audience's hub address (see `hub-address.ts`): the operator's stored
85137
- * override, the address in use, and where it came from.
85159
+ * DEPRECATED compatibility shape of `getHubAddresses` (D729 amendment, kept
85160
+ * for addons built against it): `cluster` is the `internal` role, `browser`
85161
+ * the `publicEndpoint` role; `override` is the flagged address.
85138
85162
  */
85139
85163
  var HubAddressSnapshotSchema = object({
85140
- /** The operator's override, or null for automatic. */
85141
85164
  override: string().nullable(),
85142
- /** The address in use, or null when nothing qualifies (never loopback). */
85143
85165
  resolved: string().nullable(),
85144
85166
  source: _enum([
85145
85167
  "override",
@@ -85148,11 +85170,57 @@ var HubAddressSnapshotSchema = object({
85148
85170
  ])
85149
85171
  });
85150
85172
  var HubAddressesSchema = object({
85151
- /** "Hub address for agents" — agents' bundle/model pulls, LAN devices. */
85152
85173
  cluster: HubAddressSnapshotSchema,
85153
- /** "Public address for sign-in links" — e-mail links, OIDC, WebAuthn, OAuth2. */
85154
85174
  browser: HubAddressSnapshotSchema
85155
85175
  });
85176
+ /**
85177
+ * What an address is used for (`hub-address.ts`, D734). `appConnections` is
85178
+ * many-valued; `notificationTaps`, `publicEndpoint` and `internal` are carried
85179
+ * by at most one address.
85180
+ */
85181
+ var HubAddressRoleSchema = _enum(HUB_ADDRESS_ROLES);
85182
+ var RoleSourceSchema = _enum([
85183
+ "flagged",
85184
+ "auto",
85185
+ "none"
85186
+ ]);
85187
+ /** One single-valued role: the flagged address, the one in use, and why. */
85188
+ var HubAddressRoleResolutionSchema = object({
85189
+ /** The address carrying the flag, or null = automatic. */
85190
+ flagged: string().nullable(),
85191
+ /** The address in use, or null when nothing qualifies (never loopback). */
85192
+ resolved: string().nullable(),
85193
+ source: RoleSourceSchema
85194
+ });
85195
+ var HubAppConnectionsResolutionSchema = object({
85196
+ /** The addresses flagged `appConnections`, or empty = automatic. */
85197
+ flagged: array(string()).readonly(),
85198
+ /** What the apps race right now. */
85199
+ resolved: array(string()).readonly(),
85200
+ source: RoleSourceSchema
85201
+ });
85202
+ var HubAddressBookSchema = object({
85203
+ rows: array(ConnectionEndpointSchema.extend({
85204
+ /** In the hub's detected palette right now. */
85205
+ detected: boolean(),
85206
+ /** Entered by the operator (removable). */
85207
+ custom: boolean(),
85208
+ /** The roles explicitly flagged on this address. */
85209
+ flags: array(HubAddressRoleSchema).readonly(),
85210
+ /** The roles this address serves right now — flagged or automatic. */
85211
+ inUse: array(HubAddressRoleSchema).readonly(),
85212
+ /** The roles this address may be flagged with. */
85213
+ eligible: array(HubAddressRoleSchema).readonly()
85214
+ })).readonly(),
85215
+ roles: object({
85216
+ appConnections: HubAppConnectionsResolutionSchema,
85217
+ notificationTaps: HubAddressRoleResolutionSchema,
85218
+ internal: HubAddressRoleResolutionSchema,
85219
+ publicEndpoint: HubAddressRoleResolutionSchema
85220
+ }),
85221
+ /** The `hub=` an app link carries (D709), or null. */
85222
+ appLinkHub: string().nullable()
85223
+ });
85156
85224
  var AllowedAddressesSchema = object({
85157
85225
  /**
85158
85226
  * Allowlist of interface addresses operators have explicitly opted
@@ -85196,16 +85264,27 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
85196
85264
  * tunnel always emits `https://` regardless. */
85197
85265
  scheme: _enum(["http", "https"]).optional(),
85198
85266
  /** Append the CamStack app link entry (`kind: 'app-link'`, D709) —
85199
- * an address notification links can be flagged with, not a hub
85267
+ * an address notification taps can be flagged with, not a hub
85200
85268
  * route. Default `false`: racers and rankers never see it. */
85201
85269
  includeAppLink: boolean().optional()
85202
- }), GetConnectionEndpointsResultSchema), method(_void(), NotificationEndpointSchema), method(object({ baseUrl: string().nullable() }), NotificationEndpointSchema, { kind: "mutation" }), method(_void(), ViewerEndpointsSchema), method(object({ baseUrls: array(string()).readonly() }), ViewerEndpointsSchema, { kind: "mutation" }), method(_void(), HubAddressesSchema), method(object({
85203
- audience: _enum(["cluster", "browser"]),
85204
- baseUrl: string().nullable()
85205
- }), HubAddressesSchema, {
85270
+ }), GetConnectionEndpointsResultSchema), method(_void(), NotificationEndpointSchema), method(object({ baseUrl: string().nullable() }), NotificationEndpointSchema, { kind: "mutation" }), method(_void(), ViewerEndpointsSchema), method(object({ baseUrls: array(string()).readonly() }), ViewerEndpointsSchema, { kind: "mutation" }), method(object({ scheme: _enum(["http", "https"]).optional() }).optional(), HubAddressBookSchema), method(object({
85271
+ baseUrl: string(),
85272
+ label: string().max(80)
85273
+ }), HubAddressBookSchema, {
85274
+ kind: "mutation",
85275
+ auth: "admin"
85276
+ }), method(object({ baseUrl: string() }), HubAddressBookSchema, {
85277
+ kind: "mutation",
85278
+ auth: "admin"
85279
+ }), method(object({
85280
+ role: HubAddressRoleSchema,
85281
+ baseUrl: string().nullable(),
85282
+ enabled: boolean(),
85283
+ acceptInsecureHttp: boolean().optional()
85284
+ }), HubAddressBookSchema, {
85206
85285
  kind: "mutation",
85207
85286
  auth: "admin"
85208
- }), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" }), method(_void(), TlsStatusSchema), method(object({ reason: string().optional() }), TlsStatusSchema, {
85287
+ }), method(_void(), HubAddressesSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" }), method(_void(), TlsStatusSchema), method(object({ reason: string().optional() }), TlsStatusSchema, {
85209
85288
  kind: "mutation",
85210
85289
  auth: "admin"
85211
85290
  }), method(object({
@@ -96811,12 +96890,24 @@ Object.freeze({
96811
96890
  addonId: null,
96812
96891
  access: "view"
96813
96892
  },
96893
+ "localNetwork.addCustomAddress": {
96894
+ capName: "local-network",
96895
+ capScope: "system",
96896
+ addonId: null,
96897
+ access: "create"
96898
+ },
96814
96899
  "localNetwork.downloadCa": {
96815
96900
  capName: "local-network",
96816
96901
  capScope: "system",
96817
96902
  addonId: null,
96818
96903
  access: "view"
96819
96904
  },
96905
+ "localNetwork.getAddresses": {
96906
+ capName: "local-network",
96907
+ capScope: "system",
96908
+ addonId: null,
96909
+ access: "view"
96910
+ },
96820
96911
  "localNetwork.getAllowedAddresses": {
96821
96912
  capName: "local-network",
96822
96913
  capScope: "system",
@@ -96871,6 +96962,12 @@ Object.freeze({
96871
96962
  addonId: null,
96872
96963
  access: "create"
96873
96964
  },
96965
+ "localNetwork.removeCustomAddress": {
96966
+ capName: "local-network",
96967
+ capScope: "system",
96968
+ addonId: null,
96969
+ access: "delete"
96970
+ },
96874
96971
  "localNetwork.resetAllowlistToBestMatch": {
96875
96972
  capName: "local-network",
96876
96973
  capScope: "system",
@@ -96883,13 +96980,13 @@ Object.freeze({
96883
96980
  addonId: null,
96884
96981
  access: "create"
96885
96982
  },
96886
- "localNetwork.setAllowedAddresses": {
96983
+ "localNetwork.setAddressRole": {
96887
96984
  capName: "local-network",
96888
96985
  capScope: "system",
96889
96986
  addonId: null,
96890
96987
  access: "create"
96891
96988
  },
96892
- "localNetwork.setHubAddress": {
96989
+ "localNetwork.setAllowedAddresses": {
96893
96990
  capName: "local-network",
96894
96991
  capScope: "system",
96895
96992
  addonId: null,
@@ -101143,6 +101240,12 @@ Object.freeze({
101143
101240
  addonId: null,
101144
101241
  access: "create"
101145
101242
  },
101243
+ "webrtcSession.applyDownlinkProbe": {
101244
+ capName: "webrtc-session",
101245
+ capScope: "device",
101246
+ addonId: null,
101247
+ access: "create"
101248
+ },
101146
101249
  "webrtcSession.closeSession": {
101147
101250
  capName: "webrtc-session",
101148
101251
  capScope: "device",
@@ -105065,6 +105168,11 @@ Object.freeze({
105065
105168
  form: "single",
105066
105169
  optional: false
105067
105170
  }],
105171
+ "webrtcSession.applyDownlinkProbe": [{
105172
+ name: "deviceId",
105173
+ form: "single",
105174
+ optional: false
105175
+ }],
105068
105176
  "webrtcSession.closeSession": [{
105069
105177
  name: "deviceId",
105070
105178
  form: "single",
@@ -108688,10 +108796,18 @@ function cameraStreamCatalog(session) {
108688
108796
  }];
108689
108797
  }
108690
108798
  /**
108799
+ * The hub's internal address (D734) — the one a broker on another node dials
108800
+ * the relay at. Never the public endpoint: the relay is LAN traffic.
108801
+ */
108802
+ function relayHubAddress(book) {
108803
+ return book.roles.internal.resolved;
108804
+ }
108805
+ /**
108691
108806
  * The host the broker is told to dial. The provider and the ingest owner
108692
108807
  * share the hub today, but a broker on another node reaches the hub only
108693
- * through the hub's address for agents — `local-network.getHubAddresses()
108694
- * .cluster` (the Network page's override, else the detected LAN address).
108808
+ * through the hub's internal address — `local-network.getAddresses()
108809
+ * .roles.internal` (the address flagged "Internal" on the Network page, else
108810
+ * the detected LAN address).
108695
108811
  * Loopback when that names nothing: then the only broker that can dial at
108696
108812
  * all is this node's own.
108697
108813
  */
@@ -155087,14 +155203,15 @@ var DreameCameraDevice = class extends DreameChildDevice {
155087
155203
  unsubscribeRefresh = null;
155088
155204
  /** Register the stream on the broker — the server, or the lazy sentinel (push semantics; the catalog is the durable copy). */
155089
155205
  /**
155090
- * The hub's address for agents (`local-network.getHubAddresses().cluster`:
155091
- * the Network page's override, else the detected LAN address). A failed
155206
+ * The hub's address for agents and LAN devices
155207
+ * (`local-network.getAddresses().roles.internal`: the address flagged
155208
+ * "Internal" on the Network page, else the detected LAN address). A failed
155092
155209
  * read is `null` — `advertisedRfcHost` then answers loopback, which this
155093
155210
  * node's own broker can still dial.
155094
155211
  */
155095
155212
  async hubClusterAddress() {
155096
155213
  try {
155097
- return (await this.ctx.api.localNetwork.getHubAddresses.query()).cluster.resolved;
155214
+ return relayHubAddress(await this.ctx.api.localNetwork.getAddresses.query());
155098
155215
  } catch (err) {
155099
155216
  this.ctx.logger.warn("robot camera: hub address unavailable — advertising loopback", {
155100
155217
  tags: { deviceId: this.id },
package/dist/addon.mjs CHANGED
@@ -58279,7 +58279,7 @@ var ZodIssueCode = {
58279
58279
  var ZodFirstPartyTypeKind;
58280
58280
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
58281
58281
  //#endregion
58282
- //#region ../types/dist/sleep-DXKLNFvA.mjs
58282
+ //#region ../types/dist/sleep-C16NCZR2.mjs
58283
58283
  /**
58284
58284
  * The audio chunk plane's byte format, and the ONE expansion from a coded
58285
58285
  * window to float samples (D455).
@@ -69136,6 +69136,12 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
69136
69136
  kind: "mutation",
69137
69137
  auth: "admin"
69138
69138
  });
69139
+ var HUB_ADDRESS_ROLES = [
69140
+ "appConnections",
69141
+ "notificationTaps",
69142
+ "internal",
69143
+ "publicEndpoint"
69144
+ ];
69139
69145
  function hostnameOf(baseUrl) {
69140
69146
  try {
69141
69147
  const host = new URL(baseUrl).hostname;
@@ -73357,7 +73363,13 @@ var NcAlarmModeDelaysListSchema = array(object({
73357
73363
  * Absent = false (logged, not sent). Even when true it is not sent when that same sensor
73358
73364
  * is the one that starts the entry delay — the entry-delay notification already names it.
73359
73365
  */
73360
- notifySensorRewatched: boolean().optional()
73366
+ notifySensorRewatched: boolean().optional(),
73367
+ /**
73368
+ * D735: notify "ignored" when a sensor this arm bypassed really MOVED while armed (its own
73369
+ * change time is after the arm) and set nothing off. Absent = false (logged, not sent). A
73370
+ * re-sync, a recovery from `unavailable` or a duplicate is never announced, switch or not.
73371
+ */
73372
+ notifySensorIgnored: boolean().optional()
73361
73373
  })).max(8).refine(uniqueModes, { message: "modeDelays: at most one entry per arm mode" });
73362
73374
  var NcAlarmModeDelaysEditListSchema = array(object({
73363
73375
  mode: AlarmArmModeSchema,
@@ -73370,7 +73382,9 @@ var NcAlarmModeDelaysEditListSchema = array(object({
73370
73382
  /** D706: set the switch, or `null` to clear it (back to the default, false). */
73371
73383
  notifyDuringEntryDelay: boolean().nullable().optional(),
73372
73384
  /** D706: set the switch, or `null` to clear it (back to the default, false). */
73373
- notifySensorRewatched: boolean().nullable().optional()
73385
+ notifySensorRewatched: boolean().nullable().optional(),
73386
+ /** D735: set the switch, or `null` to clear it (back to the default, false). */
73387
+ notifySensorIgnored: boolean().nullable().optional()
73374
73388
  })).max(8).refine(uniqueModes, { message: "modeDelays: at most one edit per arm mode" });
73375
73389
  /** One switch of the alarm table: put ONE device on, or take it off, ONE mode's list. */
73376
73390
  var NcAlarmNonBlockingEditSchema = object({
@@ -81191,6 +81205,14 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
81191
81205
  */
81192
81206
  alive: boolean()
81193
81207
  })), method(object({
81208
+ deviceId: number().int().nonnegative(),
81209
+ sessionId: string(),
81210
+ downlinkMbps: number().nonnegative()
81211
+ }), object({
81212
+ outcome: _enum(["switching", "held"]),
81213
+ tier: CamProfileSchema.nullable(),
81214
+ reason: string()
81215
+ }), { kind: "mutation" }), method(object({
81194
81216
  deviceId: number().int().nonnegative(),
81195
81217
  sessionId: string()
81196
81218
  }), WebrtcSessionDebugSchema, { kind: "query" });
@@ -85027,7 +85049,8 @@ var ConnectionEndpointSchema = object({
85027
85049
  "lan-ipv6",
85028
85050
  "public",
85029
85051
  "loopback",
85030
- "app-link"
85052
+ "app-link",
85053
+ "custom"
85031
85054
  ]),
85032
85055
  /**
85033
85056
  * Originating-interface kind — `lan`/`wifi`/`docker`/`vpn`/`other`/
@@ -85096,7 +85119,7 @@ var GetConnectionEndpointsResultSchema = object({
85096
85119
  localPort: AdvertisedLocalPortSchema
85097
85120
  });
85098
85121
  /**
85099
- * The address flagged for notification links. `baseUrl: null` = AUTO, which
85122
+ * The address flagged for notification taps (`notificationTaps`). `baseUrl: null` = AUTO, which
85100
85123
  * since D709 is the CamStack app link; `resolved` reports the effective value,
85101
85124
  * so the UI can show it either way.
85102
85125
  */
@@ -85130,13 +85153,12 @@ var ViewerEndpointsSchema = object({
85130
85153
  resolved: array(string()).readonly()
85131
85154
  });
85132
85155
  /**
85133
- * One audience's hub address (see `hub-address.ts`): the operator's stored
85134
- * override, the address in use, and where it came from.
85156
+ * DEPRECATED compatibility shape of `getHubAddresses` (D729 amendment, kept
85157
+ * for addons built against it): `cluster` is the `internal` role, `browser`
85158
+ * the `publicEndpoint` role; `override` is the flagged address.
85135
85159
  */
85136
85160
  var HubAddressSnapshotSchema = object({
85137
- /** The operator's override, or null for automatic. */
85138
85161
  override: string().nullable(),
85139
- /** The address in use, or null when nothing qualifies (never loopback). */
85140
85162
  resolved: string().nullable(),
85141
85163
  source: _enum([
85142
85164
  "override",
@@ -85145,11 +85167,57 @@ var HubAddressSnapshotSchema = object({
85145
85167
  ])
85146
85168
  });
85147
85169
  var HubAddressesSchema = object({
85148
- /** "Hub address for agents" — agents' bundle/model pulls, LAN devices. */
85149
85170
  cluster: HubAddressSnapshotSchema,
85150
- /** "Public address for sign-in links" — e-mail links, OIDC, WebAuthn, OAuth2. */
85151
85171
  browser: HubAddressSnapshotSchema
85152
85172
  });
85173
+ /**
85174
+ * What an address is used for (`hub-address.ts`, D734). `appConnections` is
85175
+ * many-valued; `notificationTaps`, `publicEndpoint` and `internal` are carried
85176
+ * by at most one address.
85177
+ */
85178
+ var HubAddressRoleSchema = _enum(HUB_ADDRESS_ROLES);
85179
+ var RoleSourceSchema = _enum([
85180
+ "flagged",
85181
+ "auto",
85182
+ "none"
85183
+ ]);
85184
+ /** One single-valued role: the flagged address, the one in use, and why. */
85185
+ var HubAddressRoleResolutionSchema = object({
85186
+ /** The address carrying the flag, or null = automatic. */
85187
+ flagged: string().nullable(),
85188
+ /** The address in use, or null when nothing qualifies (never loopback). */
85189
+ resolved: string().nullable(),
85190
+ source: RoleSourceSchema
85191
+ });
85192
+ var HubAppConnectionsResolutionSchema = object({
85193
+ /** The addresses flagged `appConnections`, or empty = automatic. */
85194
+ flagged: array(string()).readonly(),
85195
+ /** What the apps race right now. */
85196
+ resolved: array(string()).readonly(),
85197
+ source: RoleSourceSchema
85198
+ });
85199
+ var HubAddressBookSchema = object({
85200
+ rows: array(ConnectionEndpointSchema.extend({
85201
+ /** In the hub's detected palette right now. */
85202
+ detected: boolean(),
85203
+ /** Entered by the operator (removable). */
85204
+ custom: boolean(),
85205
+ /** The roles explicitly flagged on this address. */
85206
+ flags: array(HubAddressRoleSchema).readonly(),
85207
+ /** The roles this address serves right now — flagged or automatic. */
85208
+ inUse: array(HubAddressRoleSchema).readonly(),
85209
+ /** The roles this address may be flagged with. */
85210
+ eligible: array(HubAddressRoleSchema).readonly()
85211
+ })).readonly(),
85212
+ roles: object({
85213
+ appConnections: HubAppConnectionsResolutionSchema,
85214
+ notificationTaps: HubAddressRoleResolutionSchema,
85215
+ internal: HubAddressRoleResolutionSchema,
85216
+ publicEndpoint: HubAddressRoleResolutionSchema
85217
+ }),
85218
+ /** The `hub=` an app link carries (D709), or null. */
85219
+ appLinkHub: string().nullable()
85220
+ });
85153
85221
  var AllowedAddressesSchema = object({
85154
85222
  /**
85155
85223
  * Allowlist of interface addresses operators have explicitly opted
@@ -85193,16 +85261,27 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
85193
85261
  * tunnel always emits `https://` regardless. */
85194
85262
  scheme: _enum(["http", "https"]).optional(),
85195
85263
  /** Append the CamStack app link entry (`kind: 'app-link'`, D709) —
85196
- * an address notification links can be flagged with, not a hub
85264
+ * an address notification taps can be flagged with, not a hub
85197
85265
  * route. Default `false`: racers and rankers never see it. */
85198
85266
  includeAppLink: boolean().optional()
85199
- }), GetConnectionEndpointsResultSchema), method(_void(), NotificationEndpointSchema), method(object({ baseUrl: string().nullable() }), NotificationEndpointSchema, { kind: "mutation" }), method(_void(), ViewerEndpointsSchema), method(object({ baseUrls: array(string()).readonly() }), ViewerEndpointsSchema, { kind: "mutation" }), method(_void(), HubAddressesSchema), method(object({
85200
- audience: _enum(["cluster", "browser"]),
85201
- baseUrl: string().nullable()
85202
- }), HubAddressesSchema, {
85267
+ }), GetConnectionEndpointsResultSchema), method(_void(), NotificationEndpointSchema), method(object({ baseUrl: string().nullable() }), NotificationEndpointSchema, { kind: "mutation" }), method(_void(), ViewerEndpointsSchema), method(object({ baseUrls: array(string()).readonly() }), ViewerEndpointsSchema, { kind: "mutation" }), method(object({ scheme: _enum(["http", "https"]).optional() }).optional(), HubAddressBookSchema), method(object({
85268
+ baseUrl: string(),
85269
+ label: string().max(80)
85270
+ }), HubAddressBookSchema, {
85271
+ kind: "mutation",
85272
+ auth: "admin"
85273
+ }), method(object({ baseUrl: string() }), HubAddressBookSchema, {
85274
+ kind: "mutation",
85275
+ auth: "admin"
85276
+ }), method(object({
85277
+ role: HubAddressRoleSchema,
85278
+ baseUrl: string().nullable(),
85279
+ enabled: boolean(),
85280
+ acceptInsecureHttp: boolean().optional()
85281
+ }), HubAddressBookSchema, {
85203
85282
  kind: "mutation",
85204
85283
  auth: "admin"
85205
- }), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" }), method(_void(), TlsStatusSchema), method(object({ reason: string().optional() }), TlsStatusSchema, {
85284
+ }), method(_void(), HubAddressesSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" }), method(_void(), TlsStatusSchema), method(object({ reason: string().optional() }), TlsStatusSchema, {
85206
85285
  kind: "mutation",
85207
85286
  auth: "admin"
85208
85287
  }), method(object({
@@ -96808,12 +96887,24 @@ Object.freeze({
96808
96887
  addonId: null,
96809
96888
  access: "view"
96810
96889
  },
96890
+ "localNetwork.addCustomAddress": {
96891
+ capName: "local-network",
96892
+ capScope: "system",
96893
+ addonId: null,
96894
+ access: "create"
96895
+ },
96811
96896
  "localNetwork.downloadCa": {
96812
96897
  capName: "local-network",
96813
96898
  capScope: "system",
96814
96899
  addonId: null,
96815
96900
  access: "view"
96816
96901
  },
96902
+ "localNetwork.getAddresses": {
96903
+ capName: "local-network",
96904
+ capScope: "system",
96905
+ addonId: null,
96906
+ access: "view"
96907
+ },
96817
96908
  "localNetwork.getAllowedAddresses": {
96818
96909
  capName: "local-network",
96819
96910
  capScope: "system",
@@ -96868,6 +96959,12 @@ Object.freeze({
96868
96959
  addonId: null,
96869
96960
  access: "create"
96870
96961
  },
96962
+ "localNetwork.removeCustomAddress": {
96963
+ capName: "local-network",
96964
+ capScope: "system",
96965
+ addonId: null,
96966
+ access: "delete"
96967
+ },
96871
96968
  "localNetwork.resetAllowlistToBestMatch": {
96872
96969
  capName: "local-network",
96873
96970
  capScope: "system",
@@ -96880,13 +96977,13 @@ Object.freeze({
96880
96977
  addonId: null,
96881
96978
  access: "create"
96882
96979
  },
96883
- "localNetwork.setAllowedAddresses": {
96980
+ "localNetwork.setAddressRole": {
96884
96981
  capName: "local-network",
96885
96982
  capScope: "system",
96886
96983
  addonId: null,
96887
96984
  access: "create"
96888
96985
  },
96889
- "localNetwork.setHubAddress": {
96986
+ "localNetwork.setAllowedAddresses": {
96890
96987
  capName: "local-network",
96891
96988
  capScope: "system",
96892
96989
  addonId: null,
@@ -101140,6 +101237,12 @@ Object.freeze({
101140
101237
  addonId: null,
101141
101238
  access: "create"
101142
101239
  },
101240
+ "webrtcSession.applyDownlinkProbe": {
101241
+ capName: "webrtc-session",
101242
+ capScope: "device",
101243
+ addonId: null,
101244
+ access: "create"
101245
+ },
101143
101246
  "webrtcSession.closeSession": {
101144
101247
  capName: "webrtc-session",
101145
101248
  capScope: "device",
@@ -105062,6 +105165,11 @@ Object.freeze({
105062
105165
  form: "single",
105063
105166
  optional: false
105064
105167
  }],
105168
+ "webrtcSession.applyDownlinkProbe": [{
105169
+ name: "deviceId",
105170
+ form: "single",
105171
+ optional: false
105172
+ }],
105065
105173
  "webrtcSession.closeSession": [{
105066
105174
  name: "deviceId",
105067
105175
  form: "single",
@@ -108685,10 +108793,18 @@ function cameraStreamCatalog(session) {
108685
108793
  }];
108686
108794
  }
108687
108795
  /**
108796
+ * The hub's internal address (D734) — the one a broker on another node dials
108797
+ * the relay at. Never the public endpoint: the relay is LAN traffic.
108798
+ */
108799
+ function relayHubAddress(book) {
108800
+ return book.roles.internal.resolved;
108801
+ }
108802
+ /**
108688
108803
  * The host the broker is told to dial. The provider and the ingest owner
108689
108804
  * share the hub today, but a broker on another node reaches the hub only
108690
- * through the hub's address for agents — `local-network.getHubAddresses()
108691
- * .cluster` (the Network page's override, else the detected LAN address).
108805
+ * through the hub's internal address — `local-network.getAddresses()
108806
+ * .roles.internal` (the address flagged "Internal" on the Network page, else
108807
+ * the detected LAN address).
108692
108808
  * Loopback when that names nothing: then the only broker that can dial at
108693
108809
  * all is this node's own.
108694
108810
  */
@@ -155084,14 +155200,15 @@ var DreameCameraDevice = class extends DreameChildDevice {
155084
155200
  unsubscribeRefresh = null;
155085
155201
  /** Register the stream on the broker — the server, or the lazy sentinel (push semantics; the catalog is the durable copy). */
155086
155202
  /**
155087
- * The hub's address for agents (`local-network.getHubAddresses().cluster`:
155088
- * the Network page's override, else the detected LAN address). A failed
155203
+ * The hub's address for agents and LAN devices
155204
+ * (`local-network.getAddresses().roles.internal`: the address flagged
155205
+ * "Internal" on the Network page, else the detected LAN address). A failed
155089
155206
  * read is `null` — `advertisedRfcHost` then answers loopback, which this
155090
155207
  * node's own broker can still dial.
155091
155208
  */
155092
155209
  async hubClusterAddress() {
155093
155210
  try {
155094
- return (await this.ctx.api.localNetwork.getHubAddresses.query()).cluster.resolved;
155211
+ return relayHubAddress(await this.ctx.api.localNetwork.getAddresses.query());
155095
155212
  } catch (err) {
155096
155213
  this.ctx.logger.warn("robot camera: hub address unavailable — advertising loopback", {
155097
155214
  tags: { deviceId: this.id },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-dreame",
3
- "version": "0.2.124",
3
+ "version": "0.2.126",
4
4
  "description": "Dreame robot-vacuum / lawn-mower device-provider addon for CamStack — wraps the @apocaliss92/nodedreame Dreamehome cloud client",
5
5
  "keywords": [
6
6
  "camstack",