@camstack/server 1.2.746 → 1.2.748
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 +10 -10
- package/system/dist/{agent-https-CeiGBOLL.js → agent-https-DsAdFC8n.js} +1 -1
- package/system/dist/{agent-https-p__QCKx2.mjs → agent-https-XIAiPgNs.mjs} +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 +284 -284
- 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-MLdAmm_H.mjs → composition-sources-DKJiErim.mjs} +1 -1
- package/system/dist/{composition-sources-C9lrcs0U.js → composition-sources-DUF2KY-Q.js} +1 -1
- package/system/dist/{constants-DCW5J_Df.mjs → constants-D3cOCDWZ.mjs} +1 -1
- package/system/dist/{constants-DNhyMkdx.js → constants-Smr-sgQk.js} +1 -1
- package/system/dist/{device-ca-Cp0tBm4M.mjs → device-ca-Bjql3lRF.mjs} +1 -1
- package/system/dist/{device-ca-AYCsUsY8.js → device-ca-qPLV2_YM.js} +1 -1
- package/system/dist/{dist-CMxM4-FW.mjs → dist-BFiMX6mZ.mjs} +452 -221
- package/system/dist/{dist-B1ZljzFe.js → dist-CrwALoYk.js} +469 -220
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-CbnDQ6lH.mjs → hub-mdns-ciao-B6JK5wYQ.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-Xf67S6hV.js → hub-mdns-ciao-DBYj4N_8.js} +2 -2
- package/system/dist/index.js +7 -7
- package/system/dist/index.mjs +7 -7
- package/system/dist/{restore-archive-DLTNZsfo.js → restore-archive-DKZiYRbs.js} +1 -1
- package/system/dist/{restore-archive-CMJvv4hx.mjs → restore-archive-HEmBtC17.mjs} +82 -82
- package/system/dist/{retention-DggVaaFh.mjs → retention-CDhx9ofQ.mjs} +1 -1
- package/system/dist/{retention-tfu-EBh4.js → retention-DUTatu4f.js} +1 -1
- package/system/dist/{wal-maintenance-B5qz1TlP.js → wal-maintenance-BlfNMW7r.js} +0 -0
- package/system/dist/{wal-maintenance-Ch9XhjjA.mjs → wal-maintenance-C59YCSjx.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-DV4qxEyD.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).
|
|
@@ -3379,6 +3385,10 @@ var BaseAddon = class {
|
|
|
3379
3385
|
const stored = keychain ? await this.readAddonStoreWithRetry() : {};
|
|
3380
3386
|
const patch = {};
|
|
3381
3387
|
for (const key of keys) {
|
|
3388
|
+
if (tree.get(key)?.kind === "array") {
|
|
3389
|
+
patch[key] = [];
|
|
3390
|
+
continue;
|
|
3391
|
+
}
|
|
3382
3392
|
const keychainStored = tree.has(key) || collectSecretMarkerRefs(stored[key]).length > 0;
|
|
3383
3393
|
patch[key] = keychain && keychainStored ? SECRET_CLEAR : "";
|
|
3384
3394
|
}
|
|
@@ -8195,7 +8205,7 @@ function sleep(ms) {
|
|
|
8195
8205
|
return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
|
|
8196
8206
|
}
|
|
8197
8207
|
//#endregion
|
|
8198
|
-
//#region ../types/dist/composition-
|
|
8208
|
+
//#region ../types/dist/composition-BodkvOV0.mjs
|
|
8199
8209
|
var AUDIO_ENCODER_BY_CODEC = {
|
|
8200
8210
|
opus: "libopus",
|
|
8201
8211
|
aac: "aac",
|
|
@@ -10709,7 +10719,21 @@ var CompositionForwardCommandSchema = zod.z.object({
|
|
|
10709
10719
|
method: zod.z.string().min(1),
|
|
10710
10720
|
args: zod.z.record(zod.z.string().min(1), CompositionForwardArgSchema).optional()
|
|
10711
10721
|
});
|
|
10712
|
-
|
|
10722
|
+
/**
|
|
10723
|
+
* `extension` (D967 amendment): a method of a BUILT `media-player` is served by
|
|
10724
|
+
* the device's `remote` extension (D963/D964). No source is named — the remote
|
|
10725
|
+
* is the device's own. The dispatch redirect runs the bound role; a method whose
|
|
10726
|
+
* role is not bound answers a typed `media-player.unsupported`.
|
|
10727
|
+
*/
|
|
10728
|
+
var CompositionExtensionCommandSchema = zod.z.object({
|
|
10729
|
+
kind: zod.z.literal("extension"),
|
|
10730
|
+
target: zod.z.literal("remote")
|
|
10731
|
+
});
|
|
10732
|
+
var CompositionCommandTargetSchema = zod.z.discriminatedUnion("kind", [
|
|
10733
|
+
CompositionForwardCommandSchema,
|
|
10734
|
+
CompositionCodeSourceSchema,
|
|
10735
|
+
CompositionExtensionCommandSchema
|
|
10736
|
+
]);
|
|
10713
10737
|
/** An item key inside an item-array cap (`consumables.items[<key>]`). */
|
|
10714
10738
|
var COMPOSITION_ITEM_KEY_RE = /^[a-z0-9][a-z0-9-]{0,47}$/;
|
|
10715
10739
|
/** The item-array path of every item-array cap that exists (`consumables.items`). */
|
|
@@ -18265,6 +18289,48 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
18265
18289
|
scope: "device",
|
|
18266
18290
|
noun: t("Media player", "Lettore multimediale"),
|
|
18267
18291
|
actions: [
|
|
18292
|
+
{
|
|
18293
|
+
id: "media.turnOn",
|
|
18294
|
+
method: "turnOn",
|
|
18295
|
+
label: t("Turn on", "Accendi"),
|
|
18296
|
+
phrase: t("Turn on {device}", "Accendi {device}"),
|
|
18297
|
+
icon: "power"
|
|
18298
|
+
},
|
|
18299
|
+
{
|
|
18300
|
+
id: "media.turnOff",
|
|
18301
|
+
method: "turnOff",
|
|
18302
|
+
label: t("Turn off", "Spegni"),
|
|
18303
|
+
phrase: t("Turn off {device}", "Spegni {device}"),
|
|
18304
|
+
icon: "power"
|
|
18305
|
+
},
|
|
18306
|
+
{
|
|
18307
|
+
id: "media.volumeUp",
|
|
18308
|
+
method: "volumeUp",
|
|
18309
|
+
label: t("Volume up", "Alza il volume"),
|
|
18310
|
+
phrase: t("Raise the volume of {device}", "Alza il volume di {device}"),
|
|
18311
|
+
icon: "volume-2"
|
|
18312
|
+
},
|
|
18313
|
+
{
|
|
18314
|
+
id: "media.volumeDown",
|
|
18315
|
+
method: "volumeDown",
|
|
18316
|
+
label: t("Volume down", "Abbassa il volume"),
|
|
18317
|
+
phrase: t("Lower the volume of {device}", "Abbassa il volume di {device}"),
|
|
18318
|
+
icon: "volume-2"
|
|
18319
|
+
},
|
|
18320
|
+
{
|
|
18321
|
+
id: "media.channelUp",
|
|
18322
|
+
method: "channelUp",
|
|
18323
|
+
label: t("Channel up", "Canale successivo"),
|
|
18324
|
+
phrase: t("Go to the next channel on {device}", "Passa al canale successivo su {device}"),
|
|
18325
|
+
icon: "skip-forward"
|
|
18326
|
+
},
|
|
18327
|
+
{
|
|
18328
|
+
id: "media.channelDown",
|
|
18329
|
+
method: "channelDown",
|
|
18330
|
+
label: t("Channel down", "Canale precedente"),
|
|
18331
|
+
phrase: t("Go to the previous channel on {device}", "Torna al canale precedente su {device}"),
|
|
18332
|
+
icon: "skip-back"
|
|
18333
|
+
},
|
|
18268
18334
|
{
|
|
18269
18335
|
id: "media.play",
|
|
18270
18336
|
method: "play",
|
|
@@ -50905,6 +50971,244 @@ var controlCapability = {
|
|
|
50905
50971
|
history: "none"
|
|
50906
50972
|
};
|
|
50907
50973
|
/**
|
|
50974
|
+
* Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
|
|
50975
|
+
* Apple TV, Spotify, Roku, generic OTT receivers, …) on
|
|
50976
|
+
* `DeviceType.MediaPlayer`. Disjoint from the camera streaming
|
|
50977
|
+
* surface — those use `DeviceType.Camera` + the broker pipeline.
|
|
50978
|
+
*
|
|
50979
|
+
* The cap declares a wide method surface; not every backend supports
|
|
50980
|
+
* every method. Drivers signal sub-capability via the
|
|
50981
|
+
* `DeviceFeature.MediaPlayerXxx` flags (paired one-to-one with the
|
|
50982
|
+
* corresponding method) so the UI gates buttons without a slice
|
|
50983
|
+
* fetch — same pattern as `PanTiltZoom` for cameras.
|
|
50984
|
+
*/
|
|
50985
|
+
var MediaPlayerStateSchema = zod.z.enum([
|
|
50986
|
+
"off",
|
|
50987
|
+
"on",
|
|
50988
|
+
"idle",
|
|
50989
|
+
"playing",
|
|
50990
|
+
"paused",
|
|
50991
|
+
"buffering",
|
|
50992
|
+
"standby"
|
|
50993
|
+
]);
|
|
50994
|
+
var MediaPlayerRepeatSchema = zod.z.enum([
|
|
50995
|
+
"off",
|
|
50996
|
+
"all",
|
|
50997
|
+
"one"
|
|
50998
|
+
]);
|
|
50999
|
+
var MediaInfoSchema = zod.z.object({
|
|
51000
|
+
/** Free-form media kind (`music`, `tvshow`, `movie`, `app`, `channel`,
|
|
51001
|
+
* `podcast`, …). */
|
|
51002
|
+
type: zod.z.string(),
|
|
51003
|
+
/** Human-readable title. */
|
|
51004
|
+
title: zod.z.string(),
|
|
51005
|
+
/** Optional artist / channel / station label. */
|
|
51006
|
+
artist: zod.z.string().optional(),
|
|
51007
|
+
/** Optional album / season / show name. */
|
|
51008
|
+
album: zod.z.string().optional(),
|
|
51009
|
+
/** Optional cover-art / thumbnail URL. */
|
|
51010
|
+
imageUrl: zod.z.string().optional()
|
|
51011
|
+
});
|
|
51012
|
+
/**
|
|
51013
|
+
* Where `state`, `volumeLevel`, `isMuted` and `source` come from. `reported`:
|
|
51014
|
+
* the device said so. `assumed`: the driver has no feedback (infrared) and
|
|
51015
|
+
* tracks what it last SENT; it moves only after a send was accepted, and a
|
|
51016
|
+
* human at the real remote makes it wrong. A UI shows an assumed value as a
|
|
51017
|
+
* guess, never as a reading.
|
|
51018
|
+
*/
|
|
51019
|
+
var MediaPlayerStateSourceSchema = zod.z.enum(["reported", "assumed"]);
|
|
51020
|
+
/** The fields of a media-player status a driver can only guess. */
|
|
51021
|
+
var MediaPlayerAssumedFieldSchema = zod.z.enum([
|
|
51022
|
+
"state",
|
|
51023
|
+
"volumeLevel",
|
|
51024
|
+
"isMuted",
|
|
51025
|
+
"source"
|
|
51026
|
+
]);
|
|
51027
|
+
var MediaPlayerStatusSchema = zod.z.object({
|
|
51028
|
+
/** Playback lifecycle state. */
|
|
51029
|
+
state: MediaPlayerStateSchema,
|
|
51030
|
+
/**
|
|
51031
|
+
* Whether the state fields are readings or the driver's own bookkeeping.
|
|
51032
|
+
* A slice written before this field existed parses as `reported`.
|
|
51033
|
+
*/
|
|
51034
|
+
stateSource: MediaPlayerStateSourceSchema.default("reported"),
|
|
51035
|
+
/**
|
|
51036
|
+
* Which fields are the driver's own guess. `stateSource` is `assumed` when
|
|
51037
|
+
* this is not empty; a field not listed here is a reading even then (power
|
|
51038
|
+
* from a running-state source, mute guessed from the last send).
|
|
51039
|
+
*/
|
|
51040
|
+
assumedFields: zod.z.array(MediaPlayerAssumedFieldSchema).default([]),
|
|
51041
|
+
/** Volume as 0..100 inclusive. Null when the device has no volume
|
|
51042
|
+
* surface. Pair with `DeviceFeature.MediaPlayerVolume`. */
|
|
51043
|
+
volumeLevel: zod.z.number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
51044
|
+
/** Mute toggle distinct from volume=0. Null when no mute surface.
|
|
51045
|
+
* Pair with `DeviceFeature.MediaPlayerMute`. */
|
|
51046
|
+
isMuted: zod.z.boolean().nullable(),
|
|
51047
|
+
/** Active source / input. Empty when no source surface. */
|
|
51048
|
+
source: zod.z.string(),
|
|
51049
|
+
/** Selectable sources. Empty when no source surface.
|
|
51050
|
+
* Pair with `DeviceFeature.MediaPlayerSelectSource`. */
|
|
51051
|
+
availableSources: zod.z.array(zod.z.string()),
|
|
51052
|
+
/** Currently-playing media info. Null when nothing is playing. */
|
|
51053
|
+
currentMedia: MediaInfoSchema.nullable(),
|
|
51054
|
+
/** Current playback position in ms. Null when not seekable or
|
|
51055
|
+
* nothing is playing. Pair with `DeviceFeature.MediaPlayerSeek`. */
|
|
51056
|
+
position: zod.z.number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
51057
|
+
/** Total duration of the current media in ms. Null when unknown
|
|
51058
|
+
* (live stream) or nothing is playing. */
|
|
51059
|
+
duration: zod.z.number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
51060
|
+
/** Shuffle toggle. Null when no shuffle surface.
|
|
51061
|
+
* Pair with `DeviceFeature.MediaPlayerShuffle`. */
|
|
51062
|
+
shuffle: zod.z.boolean().nullable(),
|
|
51063
|
+
/** Repeat mode. Null when no repeat surface.
|
|
51064
|
+
* Pair with `DeviceFeature.MediaPlayerRepeat`. */
|
|
51065
|
+
repeat: MediaPlayerRepeatSchema.nullable(),
|
|
51066
|
+
/** Ms epoch when the slice was last updated. */
|
|
51067
|
+
lastChangedAt: zod.z.number()
|
|
51068
|
+
});
|
|
51069
|
+
var stepInput = zod.z.object({
|
|
51070
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
51071
|
+
/** How many presses: the caller's count (Alexa `volumeSteps`, `channelCount`). */
|
|
51072
|
+
steps: zod.z.number().int().min(1).max(50).default(1)
|
|
51073
|
+
});
|
|
51074
|
+
var deviceOnly = zod.z.object({ deviceId: zod.z.number().int().nonnegative() });
|
|
51075
|
+
var mediaPlayerCapability = {
|
|
51076
|
+
name: "media-player",
|
|
51077
|
+
scope: "device",
|
|
51078
|
+
deviceNative: true,
|
|
51079
|
+
mode: "singleton",
|
|
51080
|
+
deviceTypes: [DeviceType.MediaPlayer],
|
|
51081
|
+
methods: {
|
|
51082
|
+
turnOn: method(deviceOnly, zod.z.void(), {
|
|
51083
|
+
kind: "mutation",
|
|
51084
|
+
auth: "protected"
|
|
51085
|
+
}),
|
|
51086
|
+
turnOff: method(deviceOnly, zod.z.void(), {
|
|
51087
|
+
kind: "mutation",
|
|
51088
|
+
auth: "protected"
|
|
51089
|
+
}),
|
|
51090
|
+
volumeUp: method(stepInput, zod.z.void(), {
|
|
51091
|
+
kind: "mutation",
|
|
51092
|
+
auth: "protected"
|
|
51093
|
+
}),
|
|
51094
|
+
volumeDown: method(stepInput, zod.z.void(), {
|
|
51095
|
+
kind: "mutation",
|
|
51096
|
+
auth: "protected"
|
|
51097
|
+
}),
|
|
51098
|
+
channelUp: method(stepInput, zod.z.void(), {
|
|
51099
|
+
kind: "mutation",
|
|
51100
|
+
auth: "protected"
|
|
51101
|
+
}),
|
|
51102
|
+
channelDown: method(stepInput, zod.z.void(), {
|
|
51103
|
+
kind: "mutation",
|
|
51104
|
+
auth: "protected"
|
|
51105
|
+
}),
|
|
51106
|
+
play: method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.void(), {
|
|
51107
|
+
kind: "mutation",
|
|
51108
|
+
auth: "protected"
|
|
51109
|
+
}),
|
|
51110
|
+
pause: method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.void(), {
|
|
51111
|
+
kind: "mutation",
|
|
51112
|
+
auth: "protected"
|
|
51113
|
+
}),
|
|
51114
|
+
stop: method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.void(), {
|
|
51115
|
+
kind: "mutation",
|
|
51116
|
+
auth: "protected"
|
|
51117
|
+
}),
|
|
51118
|
+
next: method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.void(), {
|
|
51119
|
+
kind: "mutation",
|
|
51120
|
+
auth: "protected"
|
|
51121
|
+
}),
|
|
51122
|
+
previous: method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.void(), {
|
|
51123
|
+
kind: "mutation",
|
|
51124
|
+
auth: "protected"
|
|
51125
|
+
}),
|
|
51126
|
+
seek: method(zod.z.object({
|
|
51127
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
51128
|
+
position: zod.z.number().int().nonnegative()
|
|
51129
|
+
}), zod.z.void(), {
|
|
51130
|
+
kind: "mutation",
|
|
51131
|
+
auth: "protected"
|
|
51132
|
+
}),
|
|
51133
|
+
setVolume: method(zod.z.object({
|
|
51134
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
51135
|
+
volumeLevel: zod.z.number().min(0).max(100)
|
|
51136
|
+
}), zod.z.void(), {
|
|
51137
|
+
kind: "mutation",
|
|
51138
|
+
auth: "protected"
|
|
51139
|
+
}),
|
|
51140
|
+
setMute: method(zod.z.object({
|
|
51141
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
51142
|
+
muted: zod.z.boolean()
|
|
51143
|
+
}), zod.z.void(), {
|
|
51144
|
+
kind: "mutation",
|
|
51145
|
+
auth: "protected"
|
|
51146
|
+
}),
|
|
51147
|
+
setShuffle: method(zod.z.object({
|
|
51148
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
51149
|
+
shuffle: zod.z.boolean()
|
|
51150
|
+
}), zod.z.void(), {
|
|
51151
|
+
kind: "mutation",
|
|
51152
|
+
auth: "protected"
|
|
51153
|
+
}),
|
|
51154
|
+
setRepeat: method(zod.z.object({
|
|
51155
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
51156
|
+
repeat: MediaPlayerRepeatSchema
|
|
51157
|
+
}), zod.z.void(), {
|
|
51158
|
+
kind: "mutation",
|
|
51159
|
+
auth: "protected"
|
|
51160
|
+
}),
|
|
51161
|
+
selectSource: method(zod.z.object({
|
|
51162
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
51163
|
+
source: zod.z.string().min(1)
|
|
51164
|
+
}), zod.z.void(), {
|
|
51165
|
+
kind: "mutation",
|
|
51166
|
+
auth: "protected"
|
|
51167
|
+
}),
|
|
51168
|
+
playMedia: method(zod.z.object({
|
|
51169
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
51170
|
+
/** Media identifier / URL. */
|
|
51171
|
+
mediaId: zod.z.string().min(1),
|
|
51172
|
+
/** Media kind (`music`, `tvshow`, `movie`, `app`, …) — provider
|
|
51173
|
+
* passes it through to the upstream service. */
|
|
51174
|
+
mediaType: zod.z.string().min(1)
|
|
51175
|
+
}), zod.z.void(), {
|
|
51176
|
+
kind: "mutation",
|
|
51177
|
+
auth: "protected"
|
|
51178
|
+
})
|
|
51179
|
+
},
|
|
51180
|
+
status: {
|
|
51181
|
+
schema: MediaPlayerStatusSchema,
|
|
51182
|
+
kind: "push"
|
|
51183
|
+
},
|
|
51184
|
+
/**
|
|
51185
|
+
* Runtime-state slice — mirrored by the kernel. UI players read the
|
|
51186
|
+
* full slice for live now-playing, volume, and progress updates
|
|
51187
|
+
* without polling.
|
|
51188
|
+
*/
|
|
51189
|
+
runtimeState: MediaPlayerStatusSchema,
|
|
51190
|
+
/**
|
|
51191
|
+
* Runtime-state durability: **session** — a restored transport position describes a playback that stopped when the hub did.
|
|
51192
|
+
*
|
|
51193
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
51194
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
51195
|
+
*/
|
|
51196
|
+
durability: "session",
|
|
51197
|
+
/**
|
|
51198
|
+
* History (D850): volume (a level an operator or an automation sets; the
|
|
51199
|
+
* default 10 s floor folds a slider drag into its end value) and mute.
|
|
51200
|
+
* `position` is not recorded: it moves continuously while playing.
|
|
51201
|
+
*/
|
|
51202
|
+
history: { fields: {
|
|
51203
|
+
volumeLevel: {
|
|
51204
|
+
kind: "gauge",
|
|
51205
|
+
unit: "%",
|
|
51206
|
+
deadband: 1
|
|
51207
|
+
},
|
|
51208
|
+
isMuted: { kind: "boolean" }
|
|
51209
|
+
} }
|
|
51210
|
+
};
|
|
51211
|
+
/**
|
|
50908
51212
|
* Customize catalog, projected from every `*.cap.ts` `customize` block.
|
|
50909
51213
|
* 10 caps. Field keys are `runtimeState` paths. No Zod.
|
|
50910
51214
|
*/
|
|
@@ -54033,14 +54337,19 @@ function actuatorCommandCaps(composition) {
|
|
|
54033
54337
|
if (template === null || template.family !== "actuator") return /* @__PURE__ */ new Set();
|
|
54034
54338
|
return new Set(template.commandCaps);
|
|
54035
54339
|
}
|
|
54340
|
+
/** True when a `media-player` feature names the `remote` extension for a method: its status is the extension's. */
|
|
54341
|
+
function servesStatusByExtension(def, feature) {
|
|
54342
|
+
return def.name === mediaPlayerCapability.name && Object.values(feature.commands ?? {}).some((target) => target.kind === "extension");
|
|
54343
|
+
}
|
|
54036
54344
|
function builtCapProblems({ def, state, fields: targetFields }, feature, at, deviceType, servedCommands) {
|
|
54037
54345
|
const problems = [];
|
|
54038
54346
|
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] : []));
|
|
54347
|
+
const commanded = new Set(Object.entries(feature.commands ?? {}).flatMap(([name, target]) => target.kind === "forward" || target.kind === "extension" ? [name] : []));
|
|
54040
54348
|
const unserved = commandedMethods(def).filter((name) => !commanded.has(name)).map((name) => `\`${name}\``);
|
|
54041
54349
|
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
54350
|
const itemArrayPath = feature.items === void 0 ? null : def.status?.itemArray?.path ?? null;
|
|
54043
|
-
|
|
54351
|
+
const extensionStatus = servesStatusByExtension(def, feature);
|
|
54352
|
+
for (const key of extensionStatus ? [] : requiredTopLevelKeys(state)) {
|
|
54044
54353
|
if (key === itemArrayPath) continue;
|
|
54045
54354
|
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
54355
|
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 +54397,9 @@ function commandProblems(def, feature, featureIndex, mode, lookupCap) {
|
|
|
54088
54397
|
const at = `features[${featureIndex}]`;
|
|
54089
54398
|
const forwards = featureForwards(feature, featureIndex);
|
|
54090
54399
|
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
|
-
|
|
54400
|
+
const extensions = Object.entries(feature.commands ?? {}).filter(([, t]) => t.kind === "extension");
|
|
54401
|
+
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}\``))];
|
|
54402
|
+
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
54403
|
return [
|
|
54093
54404
|
...problems,
|
|
54094
54405
|
...commandMethodProblems(def, feature, at),
|
|
@@ -65075,214 +65386,6 @@ var loginMethodCapability = {
|
|
|
65075
65386
|
mount: { kind: "skip" }
|
|
65076
65387
|
};
|
|
65077
65388
|
/**
|
|
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
65389
|
* mesh-network — collection cap for mesh-VPN providers.
|
|
65287
65390
|
*
|
|
65288
65391
|
* Different shape from `network-access` (public tunnels):
|
|
@@ -84315,15 +84418,23 @@ var RemoteSendResultSchema = zod.z.discriminatedUnion("status", [
|
|
|
84315
84418
|
detail: zod.z.string().optional()
|
|
84316
84419
|
})
|
|
84317
84420
|
]);
|
|
84318
|
-
|
|
84421
|
+
/** The media-player commands a bound remote role takes over (precedence, D963). */
|
|
84422
|
+
var REMOTE_MEDIA_COMMANDS = [
|
|
84319
84423
|
"play",
|
|
84320
84424
|
"pause",
|
|
84321
84425
|
"stop",
|
|
84322
84426
|
"next",
|
|
84323
84427
|
"previous",
|
|
84324
84428
|
"setMute",
|
|
84325
|
-
"selectSource"
|
|
84326
|
-
|
|
84429
|
+
"selectSource",
|
|
84430
|
+
"turnOn",
|
|
84431
|
+
"turnOff",
|
|
84432
|
+
"volumeUp",
|
|
84433
|
+
"volumeDown",
|
|
84434
|
+
"channelUp",
|
|
84435
|
+
"channelDown"
|
|
84436
|
+
];
|
|
84437
|
+
var RemoteMediaCommandSchema = zod.z.enum(REMOTE_MEDIA_COMMANDS);
|
|
84327
84438
|
/** A send result, or `not-routed`: the role is not bound, so the native cap answers. */
|
|
84328
84439
|
var RemoteMediaCommandResultSchema = zod.z.discriminatedUnion("status", [...RemoteSendResultSchema.options, zod.z.object({ status: zod.z.literal("not-routed") })]);
|
|
84329
84440
|
var RemoteSetConfigResultSchema = zod.z.discriminatedUnion("status", [zod.z.object({ status: zod.z.literal("saved") }), zod.z.object({
|
|
@@ -84369,6 +84480,12 @@ var remoteCapability = {
|
|
|
84369
84480
|
* The dispatch redirect calls this for every caller (UI, automation,
|
|
84370
84481
|
* exporter); `repeat` is the caller's count where it has one.
|
|
84371
84482
|
*/
|
|
84483
|
+
/**
|
|
84484
|
+
* The state the remote ASSUMES for the device (what it last sent), or null
|
|
84485
|
+
* when it knows none. Power is NOT read here from a plug: that is the
|
|
84486
|
+
* media-player status's own composition (D967 amendment).
|
|
84487
|
+
*/
|
|
84488
|
+
getAssumedStatus: method(deviceInput, MediaPlayerStatusSchema.nullable(), { auth: "protected" }),
|
|
84372
84489
|
sendMediaCommand: method(deviceInput.extend({
|
|
84373
84490
|
command: RemoteMediaCommandSchema,
|
|
84374
84491
|
muted: zod.z.boolean().optional(),
|
|
@@ -87193,7 +87310,11 @@ listSignals: method(zod.z.void(), zod.z.array(StreamSignalSchema).readonly()) }
|
|
|
87193
87310
|
* `getSettingsUISchema()` surface.
|
|
87194
87311
|
*/
|
|
87195
87312
|
var SwitchStatusSchema = zod.z.object({
|
|
87196
|
-
|
|
87313
|
+
/**
|
|
87314
|
+
* `null` = the device has never reported its state (a measurement that
|
|
87315
|
+
* has not happened is unknown, never `false`).
|
|
87316
|
+
*/
|
|
87317
|
+
on: zod.z.boolean().nullable().meta({ label: "On" }),
|
|
87197
87318
|
/** Ms epoch of the last state change. Useful for UI "X minutes ago". */
|
|
87198
87319
|
lastChangedAt: zod.z.number()
|
|
87199
87320
|
});
|
|
@@ -87218,7 +87339,7 @@ var switchCapability = {
|
|
|
87218
87339
|
}) },
|
|
87219
87340
|
events: { onStateChanged: { data: zod.z.object({
|
|
87220
87341
|
deviceId: zod.z.number(),
|
|
87221
|
-
on: zod.z.boolean(),
|
|
87342
|
+
on: zod.z.boolean().nullable(),
|
|
87222
87343
|
lastChangedAt: zod.z.number()
|
|
87223
87344
|
}) } },
|
|
87224
87345
|
status: {
|
|
@@ -92081,6 +92202,32 @@ function parseStreamParamsFormPatch(patch, prefix) {
|
|
|
92081
92202
|
}
|
|
92082
92203
|
return touched ? out : null;
|
|
92083
92204
|
}
|
|
92205
|
+
/**
|
|
92206
|
+
* Which media-player surfaces a remote's BOUND roles give a device (D967
|
|
92207
|
+
* amendment). A television driven by infrared reports nothing, so its surface is
|
|
92208
|
+
* exactly what the operator wired: a bound `volume_up` is `VolumeStep`, never a
|
|
92209
|
+
* level. One mapping, read by the composer (the device's `features`) and by an
|
|
92210
|
+
* exporter deciding what to offer.
|
|
92211
|
+
*/
|
|
92212
|
+
var FEATURE_ROLES = [
|
|
92213
|
+
[DeviceFeature.MediaPlayerPower, [
|
|
92214
|
+
"power",
|
|
92215
|
+
"power_on",
|
|
92216
|
+
"power_off"
|
|
92217
|
+
]],
|
|
92218
|
+
[DeviceFeature.MediaPlayerVolumeStep, ["volume_up", "volume_down"]],
|
|
92219
|
+
[DeviceFeature.MediaPlayerChannelStep, ["channel_up", "channel_down"]],
|
|
92220
|
+
[DeviceFeature.MediaPlayerMute, ["mute"]],
|
|
92221
|
+
[DeviceFeature.MediaPlayerStop, ["stop"]],
|
|
92222
|
+
[DeviceFeature.MediaPlayerNext, ["next"]],
|
|
92223
|
+
[DeviceFeature.MediaPlayerPrevious, ["previous"]]
|
|
92224
|
+
];
|
|
92225
|
+
/** The features the bound roles stand for, in a stable order. */
|
|
92226
|
+
function mediaPlayerFeaturesOfRoles(roles) {
|
|
92227
|
+
const bound = new Set(roles);
|
|
92228
|
+
const fixed = FEATURE_ROLES.filter(([, wanted]) => wanted.some((role) => bound.has(role))).map(([feature]) => feature);
|
|
92229
|
+
return roles.some((role) => role === "input" || customKeyOfRole(role) !== null) ? [...fixed, DeviceFeature.MediaPlayerSelectSource] : fixed;
|
|
92230
|
+
}
|
|
92084
92231
|
var btn = (idSuffix, row, col, init) => ({
|
|
92085
92232
|
idSuffix,
|
|
92086
92233
|
row,
|
|
@@ -98697,6 +98844,20 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
98697
98844
|
access: "view",
|
|
98698
98845
|
role: "admin"
|
|
98699
98846
|
},
|
|
98847
|
+
"mediaPlayer.channelDown": {
|
|
98848
|
+
capName: "media-player",
|
|
98849
|
+
capScope: "device",
|
|
98850
|
+
addonId: null,
|
|
98851
|
+
access: "create",
|
|
98852
|
+
role: "viewer"
|
|
98853
|
+
},
|
|
98854
|
+
"mediaPlayer.channelUp": {
|
|
98855
|
+
capName: "media-player",
|
|
98856
|
+
capScope: "device",
|
|
98857
|
+
addonId: null,
|
|
98858
|
+
access: "create",
|
|
98859
|
+
role: "viewer"
|
|
98860
|
+
},
|
|
98700
98861
|
"mediaPlayer.getStatus": {
|
|
98701
98862
|
capName: "media-player",
|
|
98702
98863
|
capScope: "device",
|
|
@@ -98788,6 +98949,34 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
98788
98949
|
access: "create",
|
|
98789
98950
|
role: "viewer"
|
|
98790
98951
|
},
|
|
98952
|
+
"mediaPlayer.turnOff": {
|
|
98953
|
+
capName: "media-player",
|
|
98954
|
+
capScope: "device",
|
|
98955
|
+
addonId: null,
|
|
98956
|
+
access: "create",
|
|
98957
|
+
role: "viewer"
|
|
98958
|
+
},
|
|
98959
|
+
"mediaPlayer.turnOn": {
|
|
98960
|
+
capName: "media-player",
|
|
98961
|
+
capScope: "device",
|
|
98962
|
+
addonId: null,
|
|
98963
|
+
access: "create",
|
|
98964
|
+
role: "viewer"
|
|
98965
|
+
},
|
|
98966
|
+
"mediaPlayer.volumeDown": {
|
|
98967
|
+
capName: "media-player",
|
|
98968
|
+
capScope: "device",
|
|
98969
|
+
addonId: null,
|
|
98970
|
+
access: "create",
|
|
98971
|
+
role: "viewer"
|
|
98972
|
+
},
|
|
98973
|
+
"mediaPlayer.volumeUp": {
|
|
98974
|
+
capName: "media-player",
|
|
98975
|
+
capScope: "device",
|
|
98976
|
+
addonId: null,
|
|
98977
|
+
access: "create",
|
|
98978
|
+
role: "viewer"
|
|
98979
|
+
},
|
|
98791
98980
|
"meshNetwork.getStatus": {
|
|
98792
98981
|
capName: "mesh-network",
|
|
98793
98982
|
capScope: "system",
|
|
@@ -102344,6 +102533,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
102344
102533
|
access: "create",
|
|
102345
102534
|
role: "admin"
|
|
102346
102535
|
},
|
|
102536
|
+
"remote.getAssumedStatus": {
|
|
102537
|
+
capName: "remote",
|
|
102538
|
+
capScope: "system",
|
|
102539
|
+
addonId: null,
|
|
102540
|
+
access: "view",
|
|
102541
|
+
role: "admin"
|
|
102542
|
+
},
|
|
102347
102543
|
"remote.getConfig": {
|
|
102348
102544
|
capName: "remote",
|
|
102349
102545
|
capScope: "system",
|
|
@@ -106100,6 +106296,16 @@ Object.freeze({
|
|
|
106100
106296
|
form: "single",
|
|
106101
106297
|
optional: true
|
|
106102
106298
|
}],
|
|
106299
|
+
"mediaPlayer.channelDown": [{
|
|
106300
|
+
name: "deviceId",
|
|
106301
|
+
form: "single",
|
|
106302
|
+
optional: false
|
|
106303
|
+
}],
|
|
106304
|
+
"mediaPlayer.channelUp": [{
|
|
106305
|
+
name: "deviceId",
|
|
106306
|
+
form: "single",
|
|
106307
|
+
optional: false
|
|
106308
|
+
}],
|
|
106103
106309
|
"mediaPlayer.getStatus": [{
|
|
106104
106310
|
name: "deviceId",
|
|
106105
106311
|
form: "single",
|
|
@@ -106165,6 +106371,26 @@ Object.freeze({
|
|
|
106165
106371
|
form: "single",
|
|
106166
106372
|
optional: false
|
|
106167
106373
|
}],
|
|
106374
|
+
"mediaPlayer.turnOff": [{
|
|
106375
|
+
name: "deviceId",
|
|
106376
|
+
form: "single",
|
|
106377
|
+
optional: false
|
|
106378
|
+
}],
|
|
106379
|
+
"mediaPlayer.turnOn": [{
|
|
106380
|
+
name: "deviceId",
|
|
106381
|
+
form: "single",
|
|
106382
|
+
optional: false
|
|
106383
|
+
}],
|
|
106384
|
+
"mediaPlayer.volumeDown": [{
|
|
106385
|
+
name: "deviceId",
|
|
106386
|
+
form: "single",
|
|
106387
|
+
optional: false
|
|
106388
|
+
}],
|
|
106389
|
+
"mediaPlayer.volumeUp": [{
|
|
106390
|
+
name: "deviceId",
|
|
106391
|
+
form: "single",
|
|
106392
|
+
optional: false
|
|
106393
|
+
}],
|
|
106168
106394
|
"meter.getStatus": [{
|
|
106169
106395
|
name: "deviceId",
|
|
106170
106396
|
form: "single",
|
|
@@ -107330,6 +107556,11 @@ Object.freeze({
|
|
|
107330
107556
|
form: "single",
|
|
107331
107557
|
optional: true
|
|
107332
107558
|
}],
|
|
107559
|
+
"remote.getAssumedStatus": [{
|
|
107560
|
+
name: "deviceId",
|
|
107561
|
+
form: "single",
|
|
107562
|
+
optional: false
|
|
107563
|
+
}],
|
|
107333
107564
|
"remote.getConfig": [{
|
|
107334
107565
|
name: "deviceId",
|
|
107335
107566
|
form: "single",
|
|
@@ -110726,6 +110957,12 @@ Object.defineProperty(exports, "PlaintextSecretError", {
|
|
|
110726
110957
|
return PlaintextSecretError;
|
|
110727
110958
|
}
|
|
110728
110959
|
});
|
|
110960
|
+
Object.defineProperty(exports, "PowerSourceInfoSchema", {
|
|
110961
|
+
enumerable: true,
|
|
110962
|
+
get: function() {
|
|
110963
|
+
return PowerSourceInfoSchema;
|
|
110964
|
+
}
|
|
110965
|
+
});
|
|
110729
110966
|
Object.defineProperty(exports, "PreferenceDeviceIdSchema", {
|
|
110730
110967
|
enumerable: true,
|
|
110731
110968
|
get: function() {
|
|
@@ -110792,6 +111029,12 @@ Object.defineProperty(exports, "REDACTED_SECRET", {
|
|
|
110792
111029
|
return REDACTED_SECRET;
|
|
110793
111030
|
}
|
|
110794
111031
|
});
|
|
111032
|
+
Object.defineProperty(exports, "REMOTE_MEDIA_COMMANDS", {
|
|
111033
|
+
enumerable: true,
|
|
111034
|
+
get: function() {
|
|
111035
|
+
return REMOTE_MEDIA_COMMANDS;
|
|
111036
|
+
}
|
|
111037
|
+
});
|
|
110795
111038
|
Object.defineProperty(exports, "REMOVE_LEAF", {
|
|
110796
111039
|
enumerable: true,
|
|
110797
111040
|
get: function() {
|
|
@@ -112004,6 +112247,12 @@ Object.defineProperty(exports, "mediaPlayerCapability", {
|
|
|
112004
112247
|
return mediaPlayerCapability;
|
|
112005
112248
|
}
|
|
112006
112249
|
});
|
|
112250
|
+
Object.defineProperty(exports, "mediaPlayerFeaturesOfRoles", {
|
|
112251
|
+
enumerable: true,
|
|
112252
|
+
get: function() {
|
|
112253
|
+
return mediaPlayerFeaturesOfRoles;
|
|
112254
|
+
}
|
|
112255
|
+
});
|
|
112007
112256
|
Object.defineProperty(exports, "memoizePinnedFfmpeg", {
|
|
112008
112257
|
enumerable: true,
|
|
112009
112258
|
get: function() {
|