@camstack/server 1.2.745 → 1.2.747
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/api/trpc/generated-cap-routers.js +63 -0
- package/package.json +23 -9
- package/system/dist/{agent-https-zLZqE2uf.mjs → agent-https-BfUY5VmU.mjs} +1 -1
- package/system/dist/{agent-https-BcxBTl03.js → agent-https-CAt94pY2.js} +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +1 -1
- package/system/dist/builtins/camera-grid/index.mjs +1 -1
- package/system/dist/builtins/composer/composer.addon.js +75 -11
- package/system/dist/builtins/composer/composer.addon.mjs +75 -11
- package/system/dist/builtins/composer/composer.d.ts +13 -1
- package/system/dist/builtins/composer/forward-commands.d.ts +11 -0
- package/system/dist/builtins/console-logging/index.js +1 -1
- package/system/dist/builtins/console-logging/index.mjs +1 -1
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +161 -85
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +161 -85
- package/system/dist/builtins/core-blocks/remote-call-redirect.d.ts +9 -3
- package/system/dist/builtins/core-blocks/remote-service.d.ts +32 -6
- package/system/dist/builtins/core-blocks/remote-wiring.d.ts +8 -0
- package/system/dist/builtins/device-history/device-history.addon.js +2 -2
- package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +1 -1
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +3 -3
- package/system/dist/builtins/keychain/index.mjs +3 -3
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
- package/system/dist/builtins/local-network/local-network.addon.d.ts +8 -0
- package/system/dist/builtins/local-network/local-network.addon.js +99 -2
- package/system/dist/builtins/local-network/local-network.addon.mjs +99 -2
- package/system/dist/builtins/local-network/migrations/hub-node-fields.d.ts +30 -0
- package/system/dist/builtins/local-network/migrations/index.d.ts +8 -0
- package/system/dist/builtins/loki-logging/index.js +1 -1
- package/system/dist/builtins/loki-logging/index.mjs +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +1 -1
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +1 -1
- package/system/dist/builtins/snapshot/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +3 -3
- package/system/dist/builtins/winston-logging/index.js +1 -1
- package/system/dist/builtins/winston-logging/index.mjs +1 -1
- package/system/dist/{composition-sources-B8hXkZdd.js → composition-sources-BY81UoJk.js} +1 -1
- package/system/dist/{composition-sources-Bc_D8LR5.mjs → composition-sources-DsufFrcN.mjs} +1 -1
- package/system/dist/{constants-CBAenEIc.mjs → constants-BoiK7ZwD.mjs} +1 -1
- package/system/dist/{constants-oztBWIpa.js → constants-C7y03EtR.js} +1 -1
- package/system/dist/{device-ca-C5TjvqyB.js → device-ca-DN_6Q65t.js} +1 -1
- package/system/dist/{device-ca-DgEn-SoG.mjs → device-ca-FC5a_gAu.mjs} +1 -1
- package/system/dist/{dist-B0zmp3zn.js → dist-5gi6RCY-.js} +466 -220
- package/system/dist/{dist-Cdz0_zxq.mjs → dist-KFDdjTXv.mjs} +449 -221
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-DM_nVIFe.js → hub-mdns-ciao-B2_CA_s6.js} +2 -2
- package/system/dist/{hub-mdns-ciao-nWSv_w8h.mjs → hub-mdns-ciao-dArIz3_4.mjs} +2 -2
- package/system/dist/index.js +7 -7
- package/system/dist/index.mjs +7 -7
- package/system/dist/{restore-archive-gAzBMq-y.mjs → restore-archive-BpSFO8p5.mjs} +1 -1
- package/system/dist/{restore-archive-CS-DPZ3U.js → restore-archive-CPvKHlE8.js} +1 -1
- package/system/dist/{retention-Cfw9Jeyz.mjs → retention-C2ZNWzrF.mjs} +1 -1
- package/system/dist/{retention-CJ47t_51.js → retention-v4AG_OmX.js} +1 -1
- package/system/dist/{wal-maintenance-DNrQTncg.js → wal-maintenance-D60-hpsh.js} +0 -0
- package/system/dist/{wal-maintenance-Ds5hZD7d.mjs → wal-maintenance-VpFJg7Z1.mjs} +0 -0
- package/system/package.json +1 -1
|
@@ -786,7 +786,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
786
786
|
return EventCategory;
|
|
787
787
|
}({});
|
|
788
788
|
//#endregion
|
|
789
|
-
//#region ../types/dist/device-type-
|
|
789
|
+
//#region ../types/dist/device-type-D1fH5kaC.mjs
|
|
790
790
|
/**
|
|
791
791
|
import { errMsg } from '@camstack/types'
|
|
792
792
|
* Extract a human-readable message from an unknown error value.
|
|
@@ -1017,6 +1017,12 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
|
1017
1017
|
DeviceFeature["MediaPlayerPrevious"] = "media-player-previous";
|
|
1018
1018
|
/** Media player exposes stop distinct from pause. */
|
|
1019
1019
|
DeviceFeature["MediaPlayerStop"] = "media-player-stop";
|
|
1020
|
+
/** Media player exposes volume up / down in steps (an infrared TV has no level). */
|
|
1021
|
+
DeviceFeature["MediaPlayerVolumeStep"] = "media-player-volume-step";
|
|
1022
|
+
/** Media player exposes channel up / down in steps. */
|
|
1023
|
+
DeviceFeature["MediaPlayerChannelStep"] = "media-player-channel-step";
|
|
1024
|
+
/** Media player exposes power on / off. */
|
|
1025
|
+
DeviceFeature["MediaPlayerPower"] = "media-player-power";
|
|
1020
1026
|
/** Alarm panel requires a PIN code on arm/disarm. */
|
|
1021
1027
|
DeviceFeature["AlarmPinRequired"] = "alarm-pin-required";
|
|
1022
1028
|
/** Presence device carries GPS coordinates (lat/lng/accuracy) in
|
|
@@ -1165,7 +1171,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
1165
1171
|
return DeviceRole;
|
|
1166
1172
|
}({});
|
|
1167
1173
|
//#endregion
|
|
1168
|
-
//#region ../types/dist/sleep-
|
|
1174
|
+
//#region ../types/dist/sleep-BKClVk0K.mjs
|
|
1169
1175
|
/**
|
|
1170
1176
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
1171
1177
|
* window to float samples (D455).
|
|
@@ -8195,7 +8201,7 @@ function sleep(ms) {
|
|
|
8195
8201
|
return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
|
|
8196
8202
|
}
|
|
8197
8203
|
//#endregion
|
|
8198
|
-
//#region ../types/dist/composition-
|
|
8204
|
+
//#region ../types/dist/composition-BodkvOV0.mjs
|
|
8199
8205
|
var AUDIO_ENCODER_BY_CODEC = {
|
|
8200
8206
|
opus: "libopus",
|
|
8201
8207
|
aac: "aac",
|
|
@@ -10709,7 +10715,21 @@ var CompositionForwardCommandSchema = zod.z.object({
|
|
|
10709
10715
|
method: zod.z.string().min(1),
|
|
10710
10716
|
args: zod.z.record(zod.z.string().min(1), CompositionForwardArgSchema).optional()
|
|
10711
10717
|
});
|
|
10712
|
-
|
|
10718
|
+
/**
|
|
10719
|
+
* `extension` (D967 amendment): a method of a BUILT `media-player` is served by
|
|
10720
|
+
* the device's `remote` extension (D963/D964). No source is named — the remote
|
|
10721
|
+
* is the device's own. The dispatch redirect runs the bound role; a method whose
|
|
10722
|
+
* role is not bound answers a typed `media-player.unsupported`.
|
|
10723
|
+
*/
|
|
10724
|
+
var CompositionExtensionCommandSchema = zod.z.object({
|
|
10725
|
+
kind: zod.z.literal("extension"),
|
|
10726
|
+
target: zod.z.literal("remote")
|
|
10727
|
+
});
|
|
10728
|
+
var CompositionCommandTargetSchema = zod.z.discriminatedUnion("kind", [
|
|
10729
|
+
CompositionForwardCommandSchema,
|
|
10730
|
+
CompositionCodeSourceSchema,
|
|
10731
|
+
CompositionExtensionCommandSchema
|
|
10732
|
+
]);
|
|
10713
10733
|
/** An item key inside an item-array cap (`consumables.items[<key>]`). */
|
|
10714
10734
|
var COMPOSITION_ITEM_KEY_RE = /^[a-z0-9][a-z0-9-]{0,47}$/;
|
|
10715
10735
|
/** The item-array path of every item-array cap that exists (`consumables.items`). */
|
|
@@ -18265,6 +18285,48 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
18265
18285
|
scope: "device",
|
|
18266
18286
|
noun: t("Media player", "Lettore multimediale"),
|
|
18267
18287
|
actions: [
|
|
18288
|
+
{
|
|
18289
|
+
id: "media.turnOn",
|
|
18290
|
+
method: "turnOn",
|
|
18291
|
+
label: t("Turn on", "Accendi"),
|
|
18292
|
+
phrase: t("Turn on {device}", "Accendi {device}"),
|
|
18293
|
+
icon: "power"
|
|
18294
|
+
},
|
|
18295
|
+
{
|
|
18296
|
+
id: "media.turnOff",
|
|
18297
|
+
method: "turnOff",
|
|
18298
|
+
label: t("Turn off", "Spegni"),
|
|
18299
|
+
phrase: t("Turn off {device}", "Spegni {device}"),
|
|
18300
|
+
icon: "power"
|
|
18301
|
+
},
|
|
18302
|
+
{
|
|
18303
|
+
id: "media.volumeUp",
|
|
18304
|
+
method: "volumeUp",
|
|
18305
|
+
label: t("Volume up", "Alza il volume"),
|
|
18306
|
+
phrase: t("Raise the volume of {device}", "Alza il volume di {device}"),
|
|
18307
|
+
icon: "volume-2"
|
|
18308
|
+
},
|
|
18309
|
+
{
|
|
18310
|
+
id: "media.volumeDown",
|
|
18311
|
+
method: "volumeDown",
|
|
18312
|
+
label: t("Volume down", "Abbassa il volume"),
|
|
18313
|
+
phrase: t("Lower the volume of {device}", "Abbassa il volume di {device}"),
|
|
18314
|
+
icon: "volume-2"
|
|
18315
|
+
},
|
|
18316
|
+
{
|
|
18317
|
+
id: "media.channelUp",
|
|
18318
|
+
method: "channelUp",
|
|
18319
|
+
label: t("Channel up", "Canale successivo"),
|
|
18320
|
+
phrase: t("Go to the next channel on {device}", "Passa al canale successivo su {device}"),
|
|
18321
|
+
icon: "skip-forward"
|
|
18322
|
+
},
|
|
18323
|
+
{
|
|
18324
|
+
id: "media.channelDown",
|
|
18325
|
+
method: "channelDown",
|
|
18326
|
+
label: t("Channel down", "Canale precedente"),
|
|
18327
|
+
phrase: t("Go to the previous channel on {device}", "Torna al canale precedente su {device}"),
|
|
18328
|
+
icon: "skip-back"
|
|
18329
|
+
},
|
|
18268
18330
|
{
|
|
18269
18331
|
id: "media.play",
|
|
18270
18332
|
method: "play",
|
|
@@ -50905,6 +50967,244 @@ var controlCapability = {
|
|
|
50905
50967
|
history: "none"
|
|
50906
50968
|
};
|
|
50907
50969
|
/**
|
|
50970
|
+
* Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
|
|
50971
|
+
* Apple TV, Spotify, Roku, generic OTT receivers, …) on
|
|
50972
|
+
* `DeviceType.MediaPlayer`. Disjoint from the camera streaming
|
|
50973
|
+
* surface — those use `DeviceType.Camera` + the broker pipeline.
|
|
50974
|
+
*
|
|
50975
|
+
* The cap declares a wide method surface; not every backend supports
|
|
50976
|
+
* every method. Drivers signal sub-capability via the
|
|
50977
|
+
* `DeviceFeature.MediaPlayerXxx` flags (paired one-to-one with the
|
|
50978
|
+
* corresponding method) so the UI gates buttons without a slice
|
|
50979
|
+
* fetch — same pattern as `PanTiltZoom` for cameras.
|
|
50980
|
+
*/
|
|
50981
|
+
var MediaPlayerStateSchema = zod.z.enum([
|
|
50982
|
+
"off",
|
|
50983
|
+
"on",
|
|
50984
|
+
"idle",
|
|
50985
|
+
"playing",
|
|
50986
|
+
"paused",
|
|
50987
|
+
"buffering",
|
|
50988
|
+
"standby"
|
|
50989
|
+
]);
|
|
50990
|
+
var MediaPlayerRepeatSchema = zod.z.enum([
|
|
50991
|
+
"off",
|
|
50992
|
+
"all",
|
|
50993
|
+
"one"
|
|
50994
|
+
]);
|
|
50995
|
+
var MediaInfoSchema = zod.z.object({
|
|
50996
|
+
/** Free-form media kind (`music`, `tvshow`, `movie`, `app`, `channel`,
|
|
50997
|
+
* `podcast`, …). */
|
|
50998
|
+
type: zod.z.string(),
|
|
50999
|
+
/** Human-readable title. */
|
|
51000
|
+
title: zod.z.string(),
|
|
51001
|
+
/** Optional artist / channel / station label. */
|
|
51002
|
+
artist: zod.z.string().optional(),
|
|
51003
|
+
/** Optional album / season / show name. */
|
|
51004
|
+
album: zod.z.string().optional(),
|
|
51005
|
+
/** Optional cover-art / thumbnail URL. */
|
|
51006
|
+
imageUrl: zod.z.string().optional()
|
|
51007
|
+
});
|
|
51008
|
+
/**
|
|
51009
|
+
* Where `state`, `volumeLevel`, `isMuted` and `source` come from. `reported`:
|
|
51010
|
+
* the device said so. `assumed`: the driver has no feedback (infrared) and
|
|
51011
|
+
* tracks what it last SENT; it moves only after a send was accepted, and a
|
|
51012
|
+
* human at the real remote makes it wrong. A UI shows an assumed value as a
|
|
51013
|
+
* guess, never as a reading.
|
|
51014
|
+
*/
|
|
51015
|
+
var MediaPlayerStateSourceSchema = zod.z.enum(["reported", "assumed"]);
|
|
51016
|
+
/** The fields of a media-player status a driver can only guess. */
|
|
51017
|
+
var MediaPlayerAssumedFieldSchema = zod.z.enum([
|
|
51018
|
+
"state",
|
|
51019
|
+
"volumeLevel",
|
|
51020
|
+
"isMuted",
|
|
51021
|
+
"source"
|
|
51022
|
+
]);
|
|
51023
|
+
var MediaPlayerStatusSchema = zod.z.object({
|
|
51024
|
+
/** Playback lifecycle state. */
|
|
51025
|
+
state: MediaPlayerStateSchema,
|
|
51026
|
+
/**
|
|
51027
|
+
* Whether the state fields are readings or the driver's own bookkeeping.
|
|
51028
|
+
* A slice written before this field existed parses as `reported`.
|
|
51029
|
+
*/
|
|
51030
|
+
stateSource: MediaPlayerStateSourceSchema.default("reported"),
|
|
51031
|
+
/**
|
|
51032
|
+
* Which fields are the driver's own guess. `stateSource` is `assumed` when
|
|
51033
|
+
* this is not empty; a field not listed here is a reading even then (power
|
|
51034
|
+
* from a running-state source, mute guessed from the last send).
|
|
51035
|
+
*/
|
|
51036
|
+
assumedFields: zod.z.array(MediaPlayerAssumedFieldSchema).default([]),
|
|
51037
|
+
/** Volume as 0..100 inclusive. Null when the device has no volume
|
|
51038
|
+
* surface. Pair with `DeviceFeature.MediaPlayerVolume`. */
|
|
51039
|
+
volumeLevel: zod.z.number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
51040
|
+
/** Mute toggle distinct from volume=0. Null when no mute surface.
|
|
51041
|
+
* Pair with `DeviceFeature.MediaPlayerMute`. */
|
|
51042
|
+
isMuted: zod.z.boolean().nullable(),
|
|
51043
|
+
/** Active source / input. Empty when no source surface. */
|
|
51044
|
+
source: zod.z.string(),
|
|
51045
|
+
/** Selectable sources. Empty when no source surface.
|
|
51046
|
+
* Pair with `DeviceFeature.MediaPlayerSelectSource`. */
|
|
51047
|
+
availableSources: zod.z.array(zod.z.string()),
|
|
51048
|
+
/** Currently-playing media info. Null when nothing is playing. */
|
|
51049
|
+
currentMedia: MediaInfoSchema.nullable(),
|
|
51050
|
+
/** Current playback position in ms. Null when not seekable or
|
|
51051
|
+
* nothing is playing. Pair with `DeviceFeature.MediaPlayerSeek`. */
|
|
51052
|
+
position: zod.z.number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
51053
|
+
/** Total duration of the current media in ms. Null when unknown
|
|
51054
|
+
* (live stream) or nothing is playing. */
|
|
51055
|
+
duration: zod.z.number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
51056
|
+
/** Shuffle toggle. Null when no shuffle surface.
|
|
51057
|
+
* Pair with `DeviceFeature.MediaPlayerShuffle`. */
|
|
51058
|
+
shuffle: zod.z.boolean().nullable(),
|
|
51059
|
+
/** Repeat mode. Null when no repeat surface.
|
|
51060
|
+
* Pair with `DeviceFeature.MediaPlayerRepeat`. */
|
|
51061
|
+
repeat: MediaPlayerRepeatSchema.nullable(),
|
|
51062
|
+
/** Ms epoch when the slice was last updated. */
|
|
51063
|
+
lastChangedAt: zod.z.number()
|
|
51064
|
+
});
|
|
51065
|
+
var stepInput = zod.z.object({
|
|
51066
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
51067
|
+
/** How many presses: the caller's count (Alexa `volumeSteps`, `channelCount`). */
|
|
51068
|
+
steps: zod.z.number().int().min(1).max(50).default(1)
|
|
51069
|
+
});
|
|
51070
|
+
var deviceOnly = zod.z.object({ deviceId: zod.z.number().int().nonnegative() });
|
|
51071
|
+
var mediaPlayerCapability = {
|
|
51072
|
+
name: "media-player",
|
|
51073
|
+
scope: "device",
|
|
51074
|
+
deviceNative: true,
|
|
51075
|
+
mode: "singleton",
|
|
51076
|
+
deviceTypes: [DeviceType.MediaPlayer],
|
|
51077
|
+
methods: {
|
|
51078
|
+
turnOn: method(deviceOnly, zod.z.void(), {
|
|
51079
|
+
kind: "mutation",
|
|
51080
|
+
auth: "protected"
|
|
51081
|
+
}),
|
|
51082
|
+
turnOff: method(deviceOnly, zod.z.void(), {
|
|
51083
|
+
kind: "mutation",
|
|
51084
|
+
auth: "protected"
|
|
51085
|
+
}),
|
|
51086
|
+
volumeUp: method(stepInput, zod.z.void(), {
|
|
51087
|
+
kind: "mutation",
|
|
51088
|
+
auth: "protected"
|
|
51089
|
+
}),
|
|
51090
|
+
volumeDown: method(stepInput, zod.z.void(), {
|
|
51091
|
+
kind: "mutation",
|
|
51092
|
+
auth: "protected"
|
|
51093
|
+
}),
|
|
51094
|
+
channelUp: method(stepInput, zod.z.void(), {
|
|
51095
|
+
kind: "mutation",
|
|
51096
|
+
auth: "protected"
|
|
51097
|
+
}),
|
|
51098
|
+
channelDown: method(stepInput, zod.z.void(), {
|
|
51099
|
+
kind: "mutation",
|
|
51100
|
+
auth: "protected"
|
|
51101
|
+
}),
|
|
51102
|
+
play: method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.void(), {
|
|
51103
|
+
kind: "mutation",
|
|
51104
|
+
auth: "protected"
|
|
51105
|
+
}),
|
|
51106
|
+
pause: method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.void(), {
|
|
51107
|
+
kind: "mutation",
|
|
51108
|
+
auth: "protected"
|
|
51109
|
+
}),
|
|
51110
|
+
stop: method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.void(), {
|
|
51111
|
+
kind: "mutation",
|
|
51112
|
+
auth: "protected"
|
|
51113
|
+
}),
|
|
51114
|
+
next: method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.void(), {
|
|
51115
|
+
kind: "mutation",
|
|
51116
|
+
auth: "protected"
|
|
51117
|
+
}),
|
|
51118
|
+
previous: method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.void(), {
|
|
51119
|
+
kind: "mutation",
|
|
51120
|
+
auth: "protected"
|
|
51121
|
+
}),
|
|
51122
|
+
seek: method(zod.z.object({
|
|
51123
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
51124
|
+
position: zod.z.number().int().nonnegative()
|
|
51125
|
+
}), zod.z.void(), {
|
|
51126
|
+
kind: "mutation",
|
|
51127
|
+
auth: "protected"
|
|
51128
|
+
}),
|
|
51129
|
+
setVolume: method(zod.z.object({
|
|
51130
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
51131
|
+
volumeLevel: zod.z.number().min(0).max(100)
|
|
51132
|
+
}), zod.z.void(), {
|
|
51133
|
+
kind: "mutation",
|
|
51134
|
+
auth: "protected"
|
|
51135
|
+
}),
|
|
51136
|
+
setMute: method(zod.z.object({
|
|
51137
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
51138
|
+
muted: zod.z.boolean()
|
|
51139
|
+
}), zod.z.void(), {
|
|
51140
|
+
kind: "mutation",
|
|
51141
|
+
auth: "protected"
|
|
51142
|
+
}),
|
|
51143
|
+
setShuffle: method(zod.z.object({
|
|
51144
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
51145
|
+
shuffle: zod.z.boolean()
|
|
51146
|
+
}), zod.z.void(), {
|
|
51147
|
+
kind: "mutation",
|
|
51148
|
+
auth: "protected"
|
|
51149
|
+
}),
|
|
51150
|
+
setRepeat: method(zod.z.object({
|
|
51151
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
51152
|
+
repeat: MediaPlayerRepeatSchema
|
|
51153
|
+
}), zod.z.void(), {
|
|
51154
|
+
kind: "mutation",
|
|
51155
|
+
auth: "protected"
|
|
51156
|
+
}),
|
|
51157
|
+
selectSource: method(zod.z.object({
|
|
51158
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
51159
|
+
source: zod.z.string().min(1)
|
|
51160
|
+
}), zod.z.void(), {
|
|
51161
|
+
kind: "mutation",
|
|
51162
|
+
auth: "protected"
|
|
51163
|
+
}),
|
|
51164
|
+
playMedia: method(zod.z.object({
|
|
51165
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
51166
|
+
/** Media identifier / URL. */
|
|
51167
|
+
mediaId: zod.z.string().min(1),
|
|
51168
|
+
/** Media kind (`music`, `tvshow`, `movie`, `app`, …) — provider
|
|
51169
|
+
* passes it through to the upstream service. */
|
|
51170
|
+
mediaType: zod.z.string().min(1)
|
|
51171
|
+
}), zod.z.void(), {
|
|
51172
|
+
kind: "mutation",
|
|
51173
|
+
auth: "protected"
|
|
51174
|
+
})
|
|
51175
|
+
},
|
|
51176
|
+
status: {
|
|
51177
|
+
schema: MediaPlayerStatusSchema,
|
|
51178
|
+
kind: "push"
|
|
51179
|
+
},
|
|
51180
|
+
/**
|
|
51181
|
+
* Runtime-state slice — mirrored by the kernel. UI players read the
|
|
51182
|
+
* full slice for live now-playing, volume, and progress updates
|
|
51183
|
+
* without polling.
|
|
51184
|
+
*/
|
|
51185
|
+
runtimeState: MediaPlayerStatusSchema,
|
|
51186
|
+
/**
|
|
51187
|
+
* Runtime-state durability: **session** — a restored transport position describes a playback that stopped when the hub did.
|
|
51188
|
+
*
|
|
51189
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
51190
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
51191
|
+
*/
|
|
51192
|
+
durability: "session",
|
|
51193
|
+
/**
|
|
51194
|
+
* History (D850): volume (a level an operator or an automation sets; the
|
|
51195
|
+
* default 10 s floor folds a slider drag into its end value) and mute.
|
|
51196
|
+
* `position` is not recorded: it moves continuously while playing.
|
|
51197
|
+
*/
|
|
51198
|
+
history: { fields: {
|
|
51199
|
+
volumeLevel: {
|
|
51200
|
+
kind: "gauge",
|
|
51201
|
+
unit: "%",
|
|
51202
|
+
deadband: 1
|
|
51203
|
+
},
|
|
51204
|
+
isMuted: { kind: "boolean" }
|
|
51205
|
+
} }
|
|
51206
|
+
};
|
|
51207
|
+
/**
|
|
50908
51208
|
* Customize catalog, projected from every `*.cap.ts` `customize` block.
|
|
50909
51209
|
* 10 caps. Field keys are `runtimeState` paths. No Zod.
|
|
50910
51210
|
*/
|
|
@@ -54033,14 +54333,19 @@ function actuatorCommandCaps(composition) {
|
|
|
54033
54333
|
if (template === null || template.family !== "actuator") return /* @__PURE__ */ new Set();
|
|
54034
54334
|
return new Set(template.commandCaps);
|
|
54035
54335
|
}
|
|
54336
|
+
/** True when a `media-player` feature names the `remote` extension for a method: its status is the extension's. */
|
|
54337
|
+
function servesStatusByExtension(def, feature) {
|
|
54338
|
+
return def.name === mediaPlayerCapability.name && Object.values(feature.commands ?? {}).some((target) => target.kind === "extension");
|
|
54339
|
+
}
|
|
54036
54340
|
function builtCapProblems({ def, state, fields: targetFields }, feature, at, deviceType, servedCommands) {
|
|
54037
54341
|
const problems = [];
|
|
54038
54342
|
if (def.deviceTypes !== void 0 && !def.deviceTypes.includes(deviceType)) problems.push(problem("wrong-device-type", `${at}.cap`, `\`${def.name}\` is not offered on a \`${deviceType}\` device (it allows ${def.deviceTypes.join(", ")})`));
|
|
54039
|
-
const commanded = new Set(Object.entries(feature.commands ?? {}).flatMap(([name, target]) => target.kind === "forward" ? [name] : []));
|
|
54343
|
+
const commanded = new Set(Object.entries(feature.commands ?? {}).flatMap(([name, target]) => target.kind === "forward" || target.kind === "extension" ? [name] : []));
|
|
54040
54344
|
const unserved = commandedMethods(def).filter((name) => !commanded.has(name)).map((name) => `\`${name}\``);
|
|
54041
54345
|
if (unserved.length > 0 && !servedCommands.has(def.name)) problems.push(problem("has-commands", `${at}.cap`, `\`${def.name}\` has ${unserved.join(", ")} with no command — a composed device serves a method only through a \`forward\` (D967)`));
|
|
54042
54346
|
const itemArrayPath = feature.items === void 0 ? null : def.status?.itemArray?.path ?? null;
|
|
54043
|
-
|
|
54347
|
+
const extensionStatus = servesStatusByExtension(def, feature);
|
|
54348
|
+
for (const key of extensionStatus ? [] : requiredTopLevelKeys(state)) {
|
|
54044
54349
|
if (key === itemArrayPath) continue;
|
|
54045
54350
|
if (!targetFields.has(key)) problems.push(problem("not-composable", `${at}.fields`, `\`${def.name}.${key}\` is not a scalar — nested fields arrive in a later slice`));
|
|
54046
54351
|
else if (!(key in feature.fields)) problems.push(problem("missing-field", `${at}.fields.${key}`, `\`${def.name}.${key}\` is required and has no source`));
|
|
@@ -54088,7 +54393,9 @@ function commandProblems(def, feature, featureIndex, mode, lookupCap) {
|
|
|
54088
54393
|
const at = `features[${featureIndex}]`;
|
|
54089
54394
|
const forwards = featureForwards(feature, featureIndex);
|
|
54090
54395
|
const problems = Object.entries(feature.commands ?? {}).filter(([, t]) => t.kind === "code").map(([method]) => problem("reserved-variant", `${at}.commands.${method}`, "a `code` command arrives in slice 4"));
|
|
54091
|
-
|
|
54396
|
+
const extensions = Object.entries(feature.commands ?? {}).filter(([, t]) => t.kind === "extension");
|
|
54397
|
+
if (extensions.length > 0 && def.name !== mediaPlayerCapability.name) return [...problems, ...extensions.map(([method]) => problem("command-method-unknown", `${at}.commands.${method}`, `the \`remote\` extension serves a \`media-player\` only, not \`${def.name}\``))];
|
|
54398
|
+
if ((forwards.length > 0 || extensions.length > 0) && mode !== "new") return [...problems, problem("reserved-variant", `${at}.commands`, "commands (`forward`) are served only by a capability a NEW device builds — not on an existing device")];
|
|
54092
54399
|
return [
|
|
54093
54400
|
...problems,
|
|
54094
54401
|
...commandMethodProblems(def, feature, at),
|
|
@@ -65075,214 +65382,6 @@ var loginMethodCapability = {
|
|
|
65075
65382
|
mount: { kind: "skip" }
|
|
65076
65383
|
};
|
|
65077
65384
|
/**
|
|
65078
|
-
* Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
|
|
65079
|
-
* Apple TV, Spotify, Roku, generic OTT receivers, …) on
|
|
65080
|
-
* `DeviceType.MediaPlayer`. Disjoint from the camera streaming
|
|
65081
|
-
* surface — those use `DeviceType.Camera` + the broker pipeline.
|
|
65082
|
-
*
|
|
65083
|
-
* The cap declares a wide method surface; not every backend supports
|
|
65084
|
-
* every method. Drivers signal sub-capability via the
|
|
65085
|
-
* `DeviceFeature.MediaPlayerXxx` flags (paired one-to-one with the
|
|
65086
|
-
* corresponding method) so the UI gates buttons without a slice
|
|
65087
|
-
* fetch — same pattern as `PanTiltZoom` for cameras.
|
|
65088
|
-
*/
|
|
65089
|
-
var MediaPlayerStateSchema = zod.z.enum([
|
|
65090
|
-
"off",
|
|
65091
|
-
"on",
|
|
65092
|
-
"idle",
|
|
65093
|
-
"playing",
|
|
65094
|
-
"paused",
|
|
65095
|
-
"buffering",
|
|
65096
|
-
"standby"
|
|
65097
|
-
]);
|
|
65098
|
-
var MediaPlayerRepeatSchema = zod.z.enum([
|
|
65099
|
-
"off",
|
|
65100
|
-
"all",
|
|
65101
|
-
"one"
|
|
65102
|
-
]);
|
|
65103
|
-
var MediaInfoSchema = zod.z.object({
|
|
65104
|
-
/** Free-form media kind (`music`, `tvshow`, `movie`, `app`, `channel`,
|
|
65105
|
-
* `podcast`, …). */
|
|
65106
|
-
type: zod.z.string(),
|
|
65107
|
-
/** Human-readable title. */
|
|
65108
|
-
title: zod.z.string(),
|
|
65109
|
-
/** Optional artist / channel / station label. */
|
|
65110
|
-
artist: zod.z.string().optional(),
|
|
65111
|
-
/** Optional album / season / show name. */
|
|
65112
|
-
album: zod.z.string().optional(),
|
|
65113
|
-
/** Optional cover-art / thumbnail URL. */
|
|
65114
|
-
imageUrl: zod.z.string().optional()
|
|
65115
|
-
});
|
|
65116
|
-
/**
|
|
65117
|
-
* Where `state`, `volumeLevel`, `isMuted` and `source` come from. `reported`:
|
|
65118
|
-
* the device said so. `assumed`: the driver has no feedback (infrared) and
|
|
65119
|
-
* tracks what it last SENT; it moves only after a send was accepted, and a
|
|
65120
|
-
* human at the real remote makes it wrong. A UI shows an assumed value as a
|
|
65121
|
-
* guess, never as a reading.
|
|
65122
|
-
*/
|
|
65123
|
-
var MediaPlayerStateSourceSchema = zod.z.enum(["reported", "assumed"]);
|
|
65124
|
-
/** The fields of a media-player status a driver can only guess. */
|
|
65125
|
-
var MediaPlayerAssumedFieldSchema = zod.z.enum([
|
|
65126
|
-
"state",
|
|
65127
|
-
"volumeLevel",
|
|
65128
|
-
"isMuted",
|
|
65129
|
-
"source"
|
|
65130
|
-
]);
|
|
65131
|
-
var MediaPlayerStatusSchema = zod.z.object({
|
|
65132
|
-
/** Playback lifecycle state. */
|
|
65133
|
-
state: MediaPlayerStateSchema,
|
|
65134
|
-
/**
|
|
65135
|
-
* Whether the state fields are readings or the driver's own bookkeeping.
|
|
65136
|
-
* A slice written before this field existed parses as `reported`.
|
|
65137
|
-
*/
|
|
65138
|
-
stateSource: MediaPlayerStateSourceSchema.default("reported"),
|
|
65139
|
-
/**
|
|
65140
|
-
* Which fields are the driver's own guess. `stateSource` is `assumed` when
|
|
65141
|
-
* this is not empty; a field not listed here is a reading even then (power
|
|
65142
|
-
* from a running-state source, mute guessed from the last send).
|
|
65143
|
-
*/
|
|
65144
|
-
assumedFields: zod.z.array(MediaPlayerAssumedFieldSchema).default([]),
|
|
65145
|
-
/** Volume as 0..100 inclusive. Null when the device has no volume
|
|
65146
|
-
* surface. Pair with `DeviceFeature.MediaPlayerVolume`. */
|
|
65147
|
-
volumeLevel: zod.z.number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
65148
|
-
/** Mute toggle distinct from volume=0. Null when no mute surface.
|
|
65149
|
-
* Pair with `DeviceFeature.MediaPlayerMute`. */
|
|
65150
|
-
isMuted: zod.z.boolean().nullable(),
|
|
65151
|
-
/** Active source / input. Empty when no source surface. */
|
|
65152
|
-
source: zod.z.string(),
|
|
65153
|
-
/** Selectable sources. Empty when no source surface.
|
|
65154
|
-
* Pair with `DeviceFeature.MediaPlayerSelectSource`. */
|
|
65155
|
-
availableSources: zod.z.array(zod.z.string()),
|
|
65156
|
-
/** Currently-playing media info. Null when nothing is playing. */
|
|
65157
|
-
currentMedia: MediaInfoSchema.nullable(),
|
|
65158
|
-
/** Current playback position in ms. Null when not seekable or
|
|
65159
|
-
* nothing is playing. Pair with `DeviceFeature.MediaPlayerSeek`. */
|
|
65160
|
-
position: zod.z.number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
65161
|
-
/** Total duration of the current media in ms. Null when unknown
|
|
65162
|
-
* (live stream) or nothing is playing. */
|
|
65163
|
-
duration: zod.z.number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
65164
|
-
/** Shuffle toggle. Null when no shuffle surface.
|
|
65165
|
-
* Pair with `DeviceFeature.MediaPlayerShuffle`. */
|
|
65166
|
-
shuffle: zod.z.boolean().nullable(),
|
|
65167
|
-
/** Repeat mode. Null when no repeat surface.
|
|
65168
|
-
* Pair with `DeviceFeature.MediaPlayerRepeat`. */
|
|
65169
|
-
repeat: MediaPlayerRepeatSchema.nullable(),
|
|
65170
|
-
/** Ms epoch when the slice was last updated. */
|
|
65171
|
-
lastChangedAt: zod.z.number()
|
|
65172
|
-
});
|
|
65173
|
-
var mediaPlayerCapability = {
|
|
65174
|
-
name: "media-player",
|
|
65175
|
-
scope: "device",
|
|
65176
|
-
deviceNative: true,
|
|
65177
|
-
mode: "singleton",
|
|
65178
|
-
deviceTypes: [DeviceType.MediaPlayer],
|
|
65179
|
-
methods: {
|
|
65180
|
-
play: method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.void(), {
|
|
65181
|
-
kind: "mutation",
|
|
65182
|
-
auth: "protected"
|
|
65183
|
-
}),
|
|
65184
|
-
pause: method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.void(), {
|
|
65185
|
-
kind: "mutation",
|
|
65186
|
-
auth: "protected"
|
|
65187
|
-
}),
|
|
65188
|
-
stop: method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.void(), {
|
|
65189
|
-
kind: "mutation",
|
|
65190
|
-
auth: "protected"
|
|
65191
|
-
}),
|
|
65192
|
-
next: method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.void(), {
|
|
65193
|
-
kind: "mutation",
|
|
65194
|
-
auth: "protected"
|
|
65195
|
-
}),
|
|
65196
|
-
previous: method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.void(), {
|
|
65197
|
-
kind: "mutation",
|
|
65198
|
-
auth: "protected"
|
|
65199
|
-
}),
|
|
65200
|
-
seek: method(zod.z.object({
|
|
65201
|
-
deviceId: zod.z.number().int().nonnegative(),
|
|
65202
|
-
position: zod.z.number().int().nonnegative()
|
|
65203
|
-
}), zod.z.void(), {
|
|
65204
|
-
kind: "mutation",
|
|
65205
|
-
auth: "protected"
|
|
65206
|
-
}),
|
|
65207
|
-
setVolume: method(zod.z.object({
|
|
65208
|
-
deviceId: zod.z.number().int().nonnegative(),
|
|
65209
|
-
volumeLevel: zod.z.number().min(0).max(100)
|
|
65210
|
-
}), zod.z.void(), {
|
|
65211
|
-
kind: "mutation",
|
|
65212
|
-
auth: "protected"
|
|
65213
|
-
}),
|
|
65214
|
-
setMute: method(zod.z.object({
|
|
65215
|
-
deviceId: zod.z.number().int().nonnegative(),
|
|
65216
|
-
muted: zod.z.boolean()
|
|
65217
|
-
}), zod.z.void(), {
|
|
65218
|
-
kind: "mutation",
|
|
65219
|
-
auth: "protected"
|
|
65220
|
-
}),
|
|
65221
|
-
setShuffle: method(zod.z.object({
|
|
65222
|
-
deviceId: zod.z.number().int().nonnegative(),
|
|
65223
|
-
shuffle: zod.z.boolean()
|
|
65224
|
-
}), zod.z.void(), {
|
|
65225
|
-
kind: "mutation",
|
|
65226
|
-
auth: "protected"
|
|
65227
|
-
}),
|
|
65228
|
-
setRepeat: method(zod.z.object({
|
|
65229
|
-
deviceId: zod.z.number().int().nonnegative(),
|
|
65230
|
-
repeat: MediaPlayerRepeatSchema
|
|
65231
|
-
}), zod.z.void(), {
|
|
65232
|
-
kind: "mutation",
|
|
65233
|
-
auth: "protected"
|
|
65234
|
-
}),
|
|
65235
|
-
selectSource: method(zod.z.object({
|
|
65236
|
-
deviceId: zod.z.number().int().nonnegative(),
|
|
65237
|
-
source: zod.z.string().min(1)
|
|
65238
|
-
}), zod.z.void(), {
|
|
65239
|
-
kind: "mutation",
|
|
65240
|
-
auth: "protected"
|
|
65241
|
-
}),
|
|
65242
|
-
playMedia: method(zod.z.object({
|
|
65243
|
-
deviceId: zod.z.number().int().nonnegative(),
|
|
65244
|
-
/** Media identifier / URL. */
|
|
65245
|
-
mediaId: zod.z.string().min(1),
|
|
65246
|
-
/** Media kind (`music`, `tvshow`, `movie`, `app`, …) — provider
|
|
65247
|
-
* passes it through to the upstream service. */
|
|
65248
|
-
mediaType: zod.z.string().min(1)
|
|
65249
|
-
}), zod.z.void(), {
|
|
65250
|
-
kind: "mutation",
|
|
65251
|
-
auth: "protected"
|
|
65252
|
-
})
|
|
65253
|
-
},
|
|
65254
|
-
status: {
|
|
65255
|
-
schema: MediaPlayerStatusSchema,
|
|
65256
|
-
kind: "push"
|
|
65257
|
-
},
|
|
65258
|
-
/**
|
|
65259
|
-
* Runtime-state slice — mirrored by the kernel. UI players read the
|
|
65260
|
-
* full slice for live now-playing, volume, and progress updates
|
|
65261
|
-
* without polling.
|
|
65262
|
-
*/
|
|
65263
|
-
runtimeState: MediaPlayerStatusSchema,
|
|
65264
|
-
/**
|
|
65265
|
-
* Runtime-state durability: **session** — a restored transport position describes a playback that stopped when the hub did.
|
|
65266
|
-
*
|
|
65267
|
-
* See `RuntimeStateDurability`. Enforced by
|
|
65268
|
-
* `scripts/check-runtime-state-durability.ts`.
|
|
65269
|
-
*/
|
|
65270
|
-
durability: "session",
|
|
65271
|
-
/**
|
|
65272
|
-
* History (D850): volume (a level an operator or an automation sets; the
|
|
65273
|
-
* default 10 s floor folds a slider drag into its end value) and mute.
|
|
65274
|
-
* `position` is not recorded: it moves continuously while playing.
|
|
65275
|
-
*/
|
|
65276
|
-
history: { fields: {
|
|
65277
|
-
volumeLevel: {
|
|
65278
|
-
kind: "gauge",
|
|
65279
|
-
unit: "%",
|
|
65280
|
-
deadband: 1
|
|
65281
|
-
},
|
|
65282
|
-
isMuted: { kind: "boolean" }
|
|
65283
|
-
} }
|
|
65284
|
-
};
|
|
65285
|
-
/**
|
|
65286
65385
|
* mesh-network — collection cap for mesh-VPN providers.
|
|
65287
65386
|
*
|
|
65288
65387
|
* Different shape from `network-access` (public tunnels):
|
|
@@ -84315,15 +84414,23 @@ var RemoteSendResultSchema = zod.z.discriminatedUnion("status", [
|
|
|
84315
84414
|
detail: zod.z.string().optional()
|
|
84316
84415
|
})
|
|
84317
84416
|
]);
|
|
84318
|
-
|
|
84417
|
+
/** The media-player commands a bound remote role takes over (precedence, D963). */
|
|
84418
|
+
var REMOTE_MEDIA_COMMANDS = [
|
|
84319
84419
|
"play",
|
|
84320
84420
|
"pause",
|
|
84321
84421
|
"stop",
|
|
84322
84422
|
"next",
|
|
84323
84423
|
"previous",
|
|
84324
84424
|
"setMute",
|
|
84325
|
-
"selectSource"
|
|
84326
|
-
|
|
84425
|
+
"selectSource",
|
|
84426
|
+
"turnOn",
|
|
84427
|
+
"turnOff",
|
|
84428
|
+
"volumeUp",
|
|
84429
|
+
"volumeDown",
|
|
84430
|
+
"channelUp",
|
|
84431
|
+
"channelDown"
|
|
84432
|
+
];
|
|
84433
|
+
var RemoteMediaCommandSchema = zod.z.enum(REMOTE_MEDIA_COMMANDS);
|
|
84327
84434
|
/** A send result, or `not-routed`: the role is not bound, so the native cap answers. */
|
|
84328
84435
|
var RemoteMediaCommandResultSchema = zod.z.discriminatedUnion("status", [...RemoteSendResultSchema.options, zod.z.object({ status: zod.z.literal("not-routed") })]);
|
|
84329
84436
|
var RemoteSetConfigResultSchema = zod.z.discriminatedUnion("status", [zod.z.object({ status: zod.z.literal("saved") }), zod.z.object({
|
|
@@ -84369,6 +84476,12 @@ var remoteCapability = {
|
|
|
84369
84476
|
* The dispatch redirect calls this for every caller (UI, automation,
|
|
84370
84477
|
* exporter); `repeat` is the caller's count where it has one.
|
|
84371
84478
|
*/
|
|
84479
|
+
/**
|
|
84480
|
+
* The state the remote ASSUMES for the device (what it last sent), or null
|
|
84481
|
+
* when it knows none. Power is NOT read here from a plug: that is the
|
|
84482
|
+
* media-player status's own composition (D967 amendment).
|
|
84483
|
+
*/
|
|
84484
|
+
getAssumedStatus: method(deviceInput, MediaPlayerStatusSchema.nullable(), { auth: "protected" }),
|
|
84372
84485
|
sendMediaCommand: method(deviceInput.extend({
|
|
84373
84486
|
command: RemoteMediaCommandSchema,
|
|
84374
84487
|
muted: zod.z.boolean().optional(),
|
|
@@ -87193,7 +87306,11 @@ listSignals: method(zod.z.void(), zod.z.array(StreamSignalSchema).readonly()) }
|
|
|
87193
87306
|
* `getSettingsUISchema()` surface.
|
|
87194
87307
|
*/
|
|
87195
87308
|
var SwitchStatusSchema = zod.z.object({
|
|
87196
|
-
|
|
87309
|
+
/**
|
|
87310
|
+
* `null` = the device has never reported its state (a measurement that
|
|
87311
|
+
* has not happened is unknown, never `false`).
|
|
87312
|
+
*/
|
|
87313
|
+
on: zod.z.boolean().nullable().meta({ label: "On" }),
|
|
87197
87314
|
/** Ms epoch of the last state change. Useful for UI "X minutes ago". */
|
|
87198
87315
|
lastChangedAt: zod.z.number()
|
|
87199
87316
|
});
|
|
@@ -87218,7 +87335,7 @@ var switchCapability = {
|
|
|
87218
87335
|
}) },
|
|
87219
87336
|
events: { onStateChanged: { data: zod.z.object({
|
|
87220
87337
|
deviceId: zod.z.number(),
|
|
87221
|
-
on: zod.z.boolean(),
|
|
87338
|
+
on: zod.z.boolean().nullable(),
|
|
87222
87339
|
lastChangedAt: zod.z.number()
|
|
87223
87340
|
}) } },
|
|
87224
87341
|
status: {
|
|
@@ -92081,6 +92198,32 @@ function parseStreamParamsFormPatch(patch, prefix) {
|
|
|
92081
92198
|
}
|
|
92082
92199
|
return touched ? out : null;
|
|
92083
92200
|
}
|
|
92201
|
+
/**
|
|
92202
|
+
* Which media-player surfaces a remote's BOUND roles give a device (D967
|
|
92203
|
+
* amendment). A television driven by infrared reports nothing, so its surface is
|
|
92204
|
+
* exactly what the operator wired: a bound `volume_up` is `VolumeStep`, never a
|
|
92205
|
+
* level. One mapping, read by the composer (the device's `features`) and by an
|
|
92206
|
+
* exporter deciding what to offer.
|
|
92207
|
+
*/
|
|
92208
|
+
var FEATURE_ROLES = [
|
|
92209
|
+
[DeviceFeature.MediaPlayerPower, [
|
|
92210
|
+
"power",
|
|
92211
|
+
"power_on",
|
|
92212
|
+
"power_off"
|
|
92213
|
+
]],
|
|
92214
|
+
[DeviceFeature.MediaPlayerVolumeStep, ["volume_up", "volume_down"]],
|
|
92215
|
+
[DeviceFeature.MediaPlayerChannelStep, ["channel_up", "channel_down"]],
|
|
92216
|
+
[DeviceFeature.MediaPlayerMute, ["mute"]],
|
|
92217
|
+
[DeviceFeature.MediaPlayerStop, ["stop"]],
|
|
92218
|
+
[DeviceFeature.MediaPlayerNext, ["next"]],
|
|
92219
|
+
[DeviceFeature.MediaPlayerPrevious, ["previous"]]
|
|
92220
|
+
];
|
|
92221
|
+
/** The features the bound roles stand for, in a stable order. */
|
|
92222
|
+
function mediaPlayerFeaturesOfRoles(roles) {
|
|
92223
|
+
const bound = new Set(roles);
|
|
92224
|
+
const fixed = FEATURE_ROLES.filter(([, wanted]) => wanted.some((role) => bound.has(role))).map(([feature]) => feature);
|
|
92225
|
+
return roles.some((role) => role === "input" || customKeyOfRole(role) !== null) ? [...fixed, DeviceFeature.MediaPlayerSelectSource] : fixed;
|
|
92226
|
+
}
|
|
92084
92227
|
var btn = (idSuffix, row, col, init) => ({
|
|
92085
92228
|
idSuffix,
|
|
92086
92229
|
row,
|
|
@@ -98697,6 +98840,20 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
98697
98840
|
access: "view",
|
|
98698
98841
|
role: "admin"
|
|
98699
98842
|
},
|
|
98843
|
+
"mediaPlayer.channelDown": {
|
|
98844
|
+
capName: "media-player",
|
|
98845
|
+
capScope: "device",
|
|
98846
|
+
addonId: null,
|
|
98847
|
+
access: "create",
|
|
98848
|
+
role: "viewer"
|
|
98849
|
+
},
|
|
98850
|
+
"mediaPlayer.channelUp": {
|
|
98851
|
+
capName: "media-player",
|
|
98852
|
+
capScope: "device",
|
|
98853
|
+
addonId: null,
|
|
98854
|
+
access: "create",
|
|
98855
|
+
role: "viewer"
|
|
98856
|
+
},
|
|
98700
98857
|
"mediaPlayer.getStatus": {
|
|
98701
98858
|
capName: "media-player",
|
|
98702
98859
|
capScope: "device",
|
|
@@ -98788,6 +98945,34 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
98788
98945
|
access: "create",
|
|
98789
98946
|
role: "viewer"
|
|
98790
98947
|
},
|
|
98948
|
+
"mediaPlayer.turnOff": {
|
|
98949
|
+
capName: "media-player",
|
|
98950
|
+
capScope: "device",
|
|
98951
|
+
addonId: null,
|
|
98952
|
+
access: "create",
|
|
98953
|
+
role: "viewer"
|
|
98954
|
+
},
|
|
98955
|
+
"mediaPlayer.turnOn": {
|
|
98956
|
+
capName: "media-player",
|
|
98957
|
+
capScope: "device",
|
|
98958
|
+
addonId: null,
|
|
98959
|
+
access: "create",
|
|
98960
|
+
role: "viewer"
|
|
98961
|
+
},
|
|
98962
|
+
"mediaPlayer.volumeDown": {
|
|
98963
|
+
capName: "media-player",
|
|
98964
|
+
capScope: "device",
|
|
98965
|
+
addonId: null,
|
|
98966
|
+
access: "create",
|
|
98967
|
+
role: "viewer"
|
|
98968
|
+
},
|
|
98969
|
+
"mediaPlayer.volumeUp": {
|
|
98970
|
+
capName: "media-player",
|
|
98971
|
+
capScope: "device",
|
|
98972
|
+
addonId: null,
|
|
98973
|
+
access: "create",
|
|
98974
|
+
role: "viewer"
|
|
98975
|
+
},
|
|
98791
98976
|
"meshNetwork.getStatus": {
|
|
98792
98977
|
capName: "mesh-network",
|
|
98793
98978
|
capScope: "system",
|
|
@@ -102344,6 +102529,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
102344
102529
|
access: "create",
|
|
102345
102530
|
role: "admin"
|
|
102346
102531
|
},
|
|
102532
|
+
"remote.getAssumedStatus": {
|
|
102533
|
+
capName: "remote",
|
|
102534
|
+
capScope: "system",
|
|
102535
|
+
addonId: null,
|
|
102536
|
+
access: "view",
|
|
102537
|
+
role: "admin"
|
|
102538
|
+
},
|
|
102347
102539
|
"remote.getConfig": {
|
|
102348
102540
|
capName: "remote",
|
|
102349
102541
|
capScope: "system",
|
|
@@ -106100,6 +106292,16 @@ Object.freeze({
|
|
|
106100
106292
|
form: "single",
|
|
106101
106293
|
optional: true
|
|
106102
106294
|
}],
|
|
106295
|
+
"mediaPlayer.channelDown": [{
|
|
106296
|
+
name: "deviceId",
|
|
106297
|
+
form: "single",
|
|
106298
|
+
optional: false
|
|
106299
|
+
}],
|
|
106300
|
+
"mediaPlayer.channelUp": [{
|
|
106301
|
+
name: "deviceId",
|
|
106302
|
+
form: "single",
|
|
106303
|
+
optional: false
|
|
106304
|
+
}],
|
|
106103
106305
|
"mediaPlayer.getStatus": [{
|
|
106104
106306
|
name: "deviceId",
|
|
106105
106307
|
form: "single",
|
|
@@ -106165,6 +106367,26 @@ Object.freeze({
|
|
|
106165
106367
|
form: "single",
|
|
106166
106368
|
optional: false
|
|
106167
106369
|
}],
|
|
106370
|
+
"mediaPlayer.turnOff": [{
|
|
106371
|
+
name: "deviceId",
|
|
106372
|
+
form: "single",
|
|
106373
|
+
optional: false
|
|
106374
|
+
}],
|
|
106375
|
+
"mediaPlayer.turnOn": [{
|
|
106376
|
+
name: "deviceId",
|
|
106377
|
+
form: "single",
|
|
106378
|
+
optional: false
|
|
106379
|
+
}],
|
|
106380
|
+
"mediaPlayer.volumeDown": [{
|
|
106381
|
+
name: "deviceId",
|
|
106382
|
+
form: "single",
|
|
106383
|
+
optional: false
|
|
106384
|
+
}],
|
|
106385
|
+
"mediaPlayer.volumeUp": [{
|
|
106386
|
+
name: "deviceId",
|
|
106387
|
+
form: "single",
|
|
106388
|
+
optional: false
|
|
106389
|
+
}],
|
|
106168
106390
|
"meter.getStatus": [{
|
|
106169
106391
|
name: "deviceId",
|
|
106170
106392
|
form: "single",
|
|
@@ -107330,6 +107552,11 @@ Object.freeze({
|
|
|
107330
107552
|
form: "single",
|
|
107331
107553
|
optional: true
|
|
107332
107554
|
}],
|
|
107555
|
+
"remote.getAssumedStatus": [{
|
|
107556
|
+
name: "deviceId",
|
|
107557
|
+
form: "single",
|
|
107558
|
+
optional: false
|
|
107559
|
+
}],
|
|
107333
107560
|
"remote.getConfig": [{
|
|
107334
107561
|
name: "deviceId",
|
|
107335
107562
|
form: "single",
|
|
@@ -108982,6 +109209,7 @@ var STATE_SUMMARY_VARS = [
|
|
|
108982
109209
|
[...RULE_TEXT],
|
|
108983
109210
|
([...RULE_TEXT], [...DEVICE_EVENTS]),
|
|
108984
109211
|
([...RULE_TEXT], [...COMBINED_ALARM]),
|
|
109212
|
+
([...RULE_TEXT], [...COMBINED_ALARM]),
|
|
108985
109213
|
([...RULE_TEXT], [...DEVICE_EVENTS]),
|
|
108986
109214
|
([...RULE_TEXT], [...BATTERY, ...CONSUMABLE]),
|
|
108987
109215
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
@@ -110725,6 +110953,12 @@ Object.defineProperty(exports, "PlaintextSecretError", {
|
|
|
110725
110953
|
return PlaintextSecretError;
|
|
110726
110954
|
}
|
|
110727
110955
|
});
|
|
110956
|
+
Object.defineProperty(exports, "PowerSourceInfoSchema", {
|
|
110957
|
+
enumerable: true,
|
|
110958
|
+
get: function() {
|
|
110959
|
+
return PowerSourceInfoSchema;
|
|
110960
|
+
}
|
|
110961
|
+
});
|
|
110728
110962
|
Object.defineProperty(exports, "PreferenceDeviceIdSchema", {
|
|
110729
110963
|
enumerable: true,
|
|
110730
110964
|
get: function() {
|
|
@@ -110791,6 +111025,12 @@ Object.defineProperty(exports, "REDACTED_SECRET", {
|
|
|
110791
111025
|
return REDACTED_SECRET;
|
|
110792
111026
|
}
|
|
110793
111027
|
});
|
|
111028
|
+
Object.defineProperty(exports, "REMOTE_MEDIA_COMMANDS", {
|
|
111029
|
+
enumerable: true,
|
|
111030
|
+
get: function() {
|
|
111031
|
+
return REMOTE_MEDIA_COMMANDS;
|
|
111032
|
+
}
|
|
111033
|
+
});
|
|
110794
111034
|
Object.defineProperty(exports, "REMOVE_LEAF", {
|
|
110795
111035
|
enumerable: true,
|
|
110796
111036
|
get: function() {
|
|
@@ -112003,6 +112243,12 @@ Object.defineProperty(exports, "mediaPlayerCapability", {
|
|
|
112003
112243
|
return mediaPlayerCapability;
|
|
112004
112244
|
}
|
|
112005
112245
|
});
|
|
112246
|
+
Object.defineProperty(exports, "mediaPlayerFeaturesOfRoles", {
|
|
112247
|
+
enumerable: true,
|
|
112248
|
+
get: function() {
|
|
112249
|
+
return mediaPlayerFeaturesOfRoles;
|
|
112250
|
+
}
|
|
112251
|
+
});
|
|
112006
112252
|
Object.defineProperty(exports, "memoizePinnedFfmpeg", {
|
|
112007
112253
|
enumerable: true,
|
|
112008
112254
|
get: function() {
|