@deadair/plugin-sdk 0.32.1 → 0.33.1

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/README.md CHANGED
@@ -421,6 +421,35 @@ it, including the time `host.fetch` parks waiting for rate-limit headroom, and
421
421
  `host.fetch` caps its own timeout by it. Read a small number as advice to wrap
422
422
  up, not as permission to run that long.
423
423
 
424
+ ## When your platform talks over a socket
425
+
426
+ Some platforms only deliver over a WebSocket you hold open: Slack's Socket Mode
427
+ and the Discord Gateway, where button presses and slash commands arrive and
428
+ nowhere else does without a public URL. `host.socket` opens one, under the same
429
+ policy as `host.fetch`:
430
+
431
+ ```ts
432
+ const socket = await host.socket(url); // wss: only, host in permissions.network
433
+ socket.onMessage(text => this.handle(JSON.parse(text)));
434
+ socket.onClose(code => this.reconnectLater(code));
435
+ socket.send(JSON.stringify({ op: 1, d: null }));
436
+ ```
437
+
438
+ Requires the `sockets` permission, and the socket's host must be in
439
+ `permissions.network` like any other upstream. A connect costs one token from that
440
+ host's rate bucket. Text frames only; a binary frame is dropped.
441
+
442
+ The socket outlives the call that opened it, so no invocation deadline applies to
443
+ it. The host bounds it instead: a frame over a few MiB closes it, a plugin may hold
444
+ only a handful at once, and disposing the plugin closes every one it still has,
445
+ **without** calling your close listeners (there is nobody left to reconnect). Stop
446
+ your own client in a `register` disposer anyway; the host's close is the backstop.
447
+
448
+ `send` after a close does nothing rather than throwing, since the likeliest sender
449
+ is a heartbeat timer, and a listener that throws is logged rather than allowed to
450
+ reach the event loop. The socket is the shape ServerKit's Socket Mode and Gateway
451
+ clients call `SocketLike`, so `connect: url => host.socket(url)` is all either needs.
452
+
424
453
  ## When your audio needs a helper to fetch it
425
454
 
426
455
  Almost every provider answers `resolveStreamUrl` out of its own head: it knows a
@@ -829,6 +858,15 @@ at a time, and stores the cursor you return. Hold the call open for up to
829
858
  the platform delivered, including what you filtered out, or the same messages
830
859
  come back forever. No cursor at all means "from now", never "replay everything".
831
860
 
861
+ **A platform that pushes holds a socket instead.** Where messages, slash
862
+ commands and button presses arrive over a WebSocket (Discord's Gateway, Slack's
863
+ Socket Mode), open it with [`host.socket`](#when-your-platform-talks-over-a-socket),
864
+ queue what it hears, and have `receive` drain the queue, waiting on it for up to
865
+ `waitMs`. Return no cursor. Start the session on the first `receive` rather than
866
+ in `onLoad`, so a failure to connect is the poll's failure and shows on your
867
+ plugin's page. `plugins/discord` is the worked example, including acknowledging
868
+ an interaction the moment it arrives, since the host answers when its turn comes.
869
+
832
870
  **Which chats count is yours to decide.** Chat ids are your platform's
833
871
  vocabulary, so the list of chats the station listens in is your configuration,
834
872
  and anything you return from `receive` is something the host acts on. Drop
@@ -852,6 +890,10 @@ buttons renders them as text or drops them.
852
890
  `announceTargets()` says which chats want which announcements (today only
853
891
  `nowPlaying`); leave it out and the station only ever answers when spoken to.
854
892
  `accepting()` is the operator's off switch, as it is for scrobbling.
893
+ `commands(list)` is told the station's commands (`{ name, description,
894
+ takesArgs }`) each time the host starts listening on your plugin, for a platform
895
+ that lists commands in its own interface; overwrite, don't append. Leave it out
896
+ and people type the commands as they always could.
855
897
 
856
898
  ## Music providers
857
899
 
@@ -1059,6 +1101,16 @@ const hushed = { speed: (voice.speed ?? 1) * 0.9 };
1059
1101
  The numbers belong to you and live in your config beside the voice they tune.
1060
1102
  The host never sees them, which is why the station's side of this is a word.
1061
1103
 
1104
+ ### Language
1105
+
1106
+ A station broadcasting in something other than English sends its language on
1107
+ every line as `SpeechRequest.language`, a BCP 47 tag. The text in that case has
1108
+ not been rewritten into English words: `1984`, `21:30` and `50%` arrive as
1109
+ written, for your engine's own normaliser to read. Hand the tag to an engine
1110
+ that takes one; an engine that picks its language from the voice can ignore it.
1111
+ Implement `listLanguages()` to say which languages the engine can speak right
1112
+ now, and the station warns the operator once when theirs is not among them.
1113
+
1062
1114
  ## Producing words
1063
1115
 
1064
1116
 
@@ -42,7 +42,7 @@ import type { ChartDescriptor, ChartEntry, ChartQuery } from './capabilities/cha
42
42
  import type { NarrationPart, NarrationPiece, NarrationPiecesQuery, NarrationSeries, NarrationText, NarrationTextQuery } from './capabilities/narration.js';
43
43
  import type { NewsFeedDescriptor, NewsItem, NewsQuery } from './capabilities/news.js';
44
44
  import type { PodcastAudio, PodcastDirectoryEntry, PodcastDirectoryQuery, PodcastEpisode, PodcastEpisodesQuery, PodcastShow } from './capabilities/podcast.js';
45
- import type { InboundMessage, MessagingAction, MessagingAnnounceTarget, MessagingButton, MessagingReceiveQuery, MessagingReceiveResult, MessagingSendResult, MessagingSender, OutboundMessage } from './capabilities/messaging.js';
45
+ import type { InboundMessage, MessagingAction, MessagingAnnounceTarget, MessagingButton, MessagingCommand, MessagingReceiveQuery, MessagingReceiveResult, MessagingSendResult, MessagingSender, OutboundMessage } from './capabilities/messaging.js';
46
46
  import type { ScrobblePlay, ScrobbleRejection, ScrobbleResult } from './capabilities/scrobble.js';
47
47
  import type { SearchQuery, SearchResult } from './capabilities/search.js';
48
48
  import type { ArtistTrack, SimilarArtist } from './capabilities/similarity.js';
@@ -52,7 +52,7 @@ import type { GetPlaylistTracksOptions, ListPlaylistsOptions, PlaybackState, Pro
52
52
  import type { LlmMessage, LlmModelInfo, LlmRequest, LlmResult, LlmToolCall, LlmToolDeclaration, LlmUsage } from './capabilities/llm.js';
53
53
  import type { SpeechLimits, SpeechRequest, SpeechVoice } from './capabilities/speech.js';
54
54
  import type { ConfigField, ConfigFieldColumn, ConfigFieldOption, ConfigFieldPreset } from './plugin.config.fields.js';
55
- import type { PlaylistTracksRequest, TrackFetchRequest, TrackFetchSession } from './plugin.host.js';
55
+ import type { PlaylistTracksRequest, PluginSocketOptions, TrackFetchRequest, TrackFetchSession } from './plugin.host.js';
56
56
  import type { PluginConnectionResult } from './plugin.lifecycle.js';
57
57
  import type { PluginManifest } from './plugin.manifest.js';
58
58
  import type { NetworkPermissionFromConfig, NetworkPermissionHost, PluginGrantRequest, PluginPermissions } from './plugin.permissions.js';
@@ -119,6 +119,7 @@ export type AssertAllBoundaryPayloadsAreJsonSafe = AssertAllTrue<{
119
119
  TrackFetchSession: IsJsonSafe<TrackFetchSession>;
120
120
  TrackFetchRequest: IsJsonSafe<TrackFetchRequest>;
121
121
  PlaylistTracksRequest: IsJsonSafe<PlaylistTracksRequest>;
122
+ PluginSocketOptions: IsJsonSafe<PluginSocketOptions>;
122
123
  SearchTracksOptions: IsJsonSafe<SearchTracksOptions>;
123
124
  ListPlaylistsOptions: IsJsonSafe<ListPlaylistsOptions>;
124
125
  GetPlaylistTracksOptions: IsJsonSafe<GetPlaylistTracksOptions>;
@@ -190,6 +191,7 @@ export type AssertAllBoundaryPayloadsAreJsonSafe = AssertAllTrue<{
190
191
  OutboundMessage: IsJsonSafe<OutboundMessage>;
191
192
  MessagingSendResult: IsJsonSafe<MessagingSendResult>;
192
193
  MessagingAnnounceTarget: IsJsonSafe<MessagingAnnounceTarget>;
194
+ MessagingCommand: IsJsonSafe<MessagingCommand>;
193
195
  SpeechLimits: IsJsonSafe<SpeechLimits>;
194
196
  }>;
195
197
  /**
@@ -197,7 +199,7 @@ export type AssertAllBoundaryPayloadsAreJsonSafe = AssertAllTrue<{
197
199
  * registry-coverage test can compare it against what is actually exported
198
200
  * from the boundary source files.
199
201
  */
200
- export declare const JSON_SAFE_PAYLOAD_TYPES: readonly ["PluginConnectionResult", "PluginPermissions", "NetworkPermissionHost", "NetworkPermissionFromConfig", "PluginGrantRequest", "ConfigField", "ConfigFieldOption", "ConfigFieldColumn", "ConfigFieldPreset", "PluginManifest", "ProviderTrack", "ProviderPlaylist", "ProviderStream", "TrackFetchSession", "TrackFetchRequest", "PlaylistTracksRequest", "SearchTracksOptions", "ListPlaylistsOptions", "GetPlaylistTracksOptions", "PlaybackState", "TrackRef", "ArtistRef", "AlbumRef", "ExternalId", "ExternalLink", "SourceDocument", "TrackEnrichment", "ArtistEnrichment", "AlbumEnrichment", "SpeechRequest", "SpeechVoice", "LlmMessage", "LlmToolDeclaration", "LlmToolCall", "LlmUsage", "LlmRequest", "LlmResult", "LlmModelInfo", "AnalysisRef", "AudioJoin", "AudioOverlay", "TrackCuePoints", "TrackLoudness", "TrackTaggedLoudness", "TrackAnalysis", "ChartDescriptor", "ChartQuery", "ChartEntry", "NewsFeedDescriptor", "NewsQuery", "NewsItem", "NarrationSeries", "NarrationPiece", "NarrationPart", "NarrationText", "NarrationPiecesQuery", "NarrationTextQuery", "PodcastShow", "PodcastAudio", "PodcastEpisode", "PodcastEpisodesQuery", "PodcastDirectoryQuery", "PodcastDirectoryEntry", "SimilarArtist", "ArtistTrack", "SearchQuery", "SearchResult", "WeatherQuery", "WeatherConditions", "WeatherDay", "WeatherReading", "AlmanacQuery", "AlmanacSubject", "AlmanacEntry", "AlmanacDay", "ScrobblePlay", "ScrobbleRejection", "ScrobbleResult", "MessagingSender", "MessagingAction", "MessagingButton", "InboundMessage", "MessagingReceiveQuery", "MessagingReceiveResult", "OutboundMessage", "MessagingSendResult", "MessagingAnnounceTarget", "SpeechLimits"];
202
+ export declare const JSON_SAFE_PAYLOAD_TYPES: readonly ["PluginConnectionResult", "PluginPermissions", "NetworkPermissionHost", "NetworkPermissionFromConfig", "PluginGrantRequest", "ConfigField", "ConfigFieldOption", "ConfigFieldColumn", "ConfigFieldPreset", "PluginManifest", "ProviderTrack", "ProviderPlaylist", "ProviderStream", "TrackFetchSession", "TrackFetchRequest", "PlaylistTracksRequest", "PluginSocketOptions", "SearchTracksOptions", "ListPlaylistsOptions", "GetPlaylistTracksOptions", "PlaybackState", "TrackRef", "ArtistRef", "AlbumRef", "ExternalId", "ExternalLink", "SourceDocument", "TrackEnrichment", "ArtistEnrichment", "AlbumEnrichment", "SpeechRequest", "SpeechVoice", "LlmMessage", "LlmToolDeclaration", "LlmToolCall", "LlmUsage", "LlmRequest", "LlmResult", "LlmModelInfo", "AnalysisRef", "AudioJoin", "AudioOverlay", "TrackCuePoints", "TrackLoudness", "TrackTaggedLoudness", "TrackAnalysis", "ChartDescriptor", "ChartQuery", "ChartEntry", "NewsFeedDescriptor", "NewsQuery", "NewsItem", "NarrationSeries", "NarrationPiece", "NarrationPart", "NarrationText", "NarrationPiecesQuery", "NarrationTextQuery", "PodcastShow", "PodcastAudio", "PodcastEpisode", "PodcastEpisodesQuery", "PodcastDirectoryQuery", "PodcastDirectoryEntry", "SimilarArtist", "ArtistTrack", "SearchQuery", "SearchResult", "WeatherQuery", "WeatherConditions", "WeatherDay", "WeatherReading", "AlmanacQuery", "AlmanacSubject", "AlmanacEntry", "AlmanacDay", "ScrobblePlay", "ScrobbleRejection", "ScrobbleResult", "MessagingSender", "MessagingAction", "MessagingButton", "InboundMessage", "MessagingReceiveQuery", "MessagingReceiveResult", "OutboundMessage", "MessagingSendResult", "MessagingAnnounceTarget", "MessagingCommand", "SpeechLimits"];
201
203
  /**
202
204
  * Boundary interfaces that are deliberately NOT payloads: they describe
203
205
  * methods, so they carry functions by definition and can never be JSON-safe.
@@ -207,7 +209,7 @@ export declare const JSON_SAFE_PAYLOAD_TYPES: readonly ["PluginConnectionResult"
207
209
  * interfaces explicitly is what makes "is this a payload or a contract?" a
208
210
  * conscious decision for anyone adding one, rather than a silent omission.
209
211
  */
210
- export declare const BOUNDARY_METHOD_TYPES: readonly ["PluginLogger", "PluginStorage", "PluginSecrets", "PluginConfigAccess", "PluginOAuth", "PluginEvents", "PluginTrackFetcher", "PluginHost", "PluginLifecycle", "MusicProviderCatalog", "MusicProviderStream", "MusicProviderSteer", "MusicProviderOAuth", "MusicProvider", "EnrichmentProvider", "SpeechPluginInstance", "LlmPluginInstance", "AnalysisProvider", "MixerProvider", "ChartsProvider", "NewsProvider", "NarrationProvider", "PodcastProvider", "SimilarityProvider", "SearchProvider", "WeatherProvider", "AlmanacProvider", "ScrobbleProvider", "MessagingProvider"];
212
+ export declare const BOUNDARY_METHOD_TYPES: readonly ["PluginLogger", "PluginStorage", "PluginSecrets", "PluginConfigAccess", "PluginOAuth", "PluginEvents", "PluginTrackFetcher", "PluginSocket", "PluginHost", "PluginLifecycle", "MusicProviderCatalog", "MusicProviderStream", "MusicProviderSteer", "MusicProviderOAuth", "MusicProvider", "EnrichmentProvider", "SpeechPluginInstance", "LlmPluginInstance", "AnalysisProvider", "MixerProvider", "ChartsProvider", "NewsProvider", "NarrationProvider", "PodcastProvider", "SimilarityProvider", "SearchProvider", "WeatherProvider", "AlmanacProvider", "ScrobbleProvider", "MessagingProvider"];
211
213
  /**
212
214
  * Boundary interfaces that deliberately carry a LIVE object, and so are neither
213
215
  * payloads nor method contracts.
@@ -1 +1 @@
1
- {"version":3,"file":"boundary.json.safe.d.ts","sourceRoot":"","sources":["../src/boundary.json.safe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACxG,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjI,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACxF,OAAO,KAAK,EACR,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,kBAAkB,EACrB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,kBAAkB,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,KAAK,EACR,YAAY,EACZ,qBAAqB,EACrB,qBAAqB,EACrB,cAAc,EACd,oBAAoB,EACpB,WAAW,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EACR,cAAc,EACd,eAAe,EACf,uBAAuB,EACvB,eAAe,EACf,qBAAqB,EACrB,sBAAsB,EACt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IACzD,sBAAsB,EAAE,UAAU,CAAC,sBAAsB,CAAC,CAAC;IAC3D,eAAe,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC;IAC7C,mBAAmB,EAAE,UAAU,CAAC,mBAAmB,CAAC,CAAC;IACrD,uBAAuB,EAAE,UAAU,CAAC,uBAAuB,CAAC,CAAC;IAC7D,gBAAgB,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC/C,YAAY,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;CAC1C,CAAC,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,qpDA2F1B,CAAC;AAEX;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,8kBA+BxB,CAAC;AAEX;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,wEAgB7B,CAAC"}
@@ -13,8 +13,13 @@
13
13
  * `after` snowflake). The host stores the cursor durably, so a restart neither
14
14
  * replays a command nor loses one.
15
15
  *
16
- * A platform that can only deliver by webhook does not fit this capability yet,
17
- * and that is a known gap rather than an oversight.
16
+ * A platform that pushes over a WebSocket (Slack's Socket Mode, the Discord
17
+ * Gateway) fits the same way: the plugin holds the socket through
18
+ * `host.socket`, queues what it hears, and `receive` drains the queue, waiting
19
+ * on it for up to `waitMs`. Such a plugin has no cursor to return.
20
+ *
21
+ * A platform that can only deliver to a public URL does not fit this
22
+ * capability yet, and that is a known gap rather than an oversight.
18
23
  *
19
24
  * ## The plugin decides which chats count
20
25
  *
@@ -165,6 +170,21 @@ export interface MessagingAnnounceTarget {
165
170
  chatId: string;
166
171
  announcements: MessagingAnnouncement[];
167
172
  }
173
+ /**
174
+ * One command the station answers to, as {@link MessagingProvider.commands} is told it.
175
+ *
176
+ * For a platform that lists commands in its own interface (Discord's slash commands, Telegram's
177
+ * command menu). The station answers the command whether or not the platform lists it: a person
178
+ * can always type `/now`.
179
+ */
180
+ export interface MessagingCommand {
181
+ /** Lower case, without the slash. */
182
+ name: string;
183
+ /** One line saying what it does, with any argument in capitals. The platform's own limit is the plugin's to fit. */
184
+ description: string;
185
+ /** Whether anything may follow the name, so a platform can offer a field for it. */
186
+ takesArgs: boolean;
187
+ }
168
188
  /**
169
189
  * Implemented by a `messaging` plugin.
170
190
  */
@@ -198,5 +218,15 @@ export interface MessagingProvider {
198
218
  * so a config change takes effect on the next one. Keep it a config read.
199
219
  */
200
220
  announceTargets?(): Promise<MessagingAnnounceTarget[]>;
221
+ /**
222
+ * The commands the station answers to, for a platform that lists them.
223
+ *
224
+ * Optional, and absent means the platform has no list to keep: people
225
+ * type the command and the station reads it. Told each time the host
226
+ * starts listening on this plugin, which includes after every config
227
+ * save, so an idempotent overwrite is the right implementation. A throw is
228
+ * logged and never stops the station listening.
229
+ */
230
+ commands?(commands: MessagingCommand[]): Promise<void>;
201
231
  }
202
232
  //# sourceMappingURL=messaging.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"messaging.d.ts","sourceRoot":"","sources":["../../src/capabilities/messaging.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,8EAA8E;AAC9E,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEnD,4DAA4D;AAC5D,MAAM,WAAW,eAAe;IAC5B;;;;;;OAMG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,2EAA2E;IAC3E,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,gDAAgD;AAChD,MAAM,WAAW,cAAc;IAC3B,kEAAkE;IAClE,EAAE,EAAE,MAAM,CAAC;IACX,wFAAwF;IACxF,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,MAAM,EAAE,eAAe,CAAC;IACxB,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,+CAA+C;IAC/C,MAAM,EAAE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AiB;IAC9B;;;;;OAKG;IACH,OAAO,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAEvE;;;;;;OAMG;IACH,IAAI,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAE7D;;;;OAIG;IACH,SAAS,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAE/B;;;;;;OAMG;IACH,eAAe,CAAC,IAAI,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAAC;IAEvD;;;;;;;;OAQG;IACH,QAAQ,CAAC,CAAC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1D"}
@@ -161,6 +161,17 @@ export interface SpeechRequest {
161
161
  * neighbours when hushed. See {@link SPEECH_DELIVERIES}.
162
162
  */
163
163
  delivery?: SpeechDelivery;
164
+ /**
165
+ * The language the text is in, as a BCP 47 tag (`de`, `fr-ca`), or absent for English.
166
+ *
167
+ * The station's broadcast language, sent on every line when it is not English. The text has not
168
+ * been rewritten for any particular engine: numbers, times and symbols arrive as digits and
169
+ * symbols, for your engine's own normaliser to read in this language. Pass it to an engine that
170
+ * takes one, and ignore it if yours picks the language from the voice. Unlike a delivery it is
171
+ * sent whether or not you claimed it through {@link SpeechPluginInstance.listLanguages}, because
172
+ * dropping it would not make the text any less German.
173
+ */
174
+ language?: string;
164
175
  }
165
176
  /** The audio for one {@link SpeechPluginInstance.speak}, and what it is. */
166
177
  export interface SpeechHandle {
@@ -290,6 +301,18 @@ export interface SpeechPluginInstance extends PluginLifecycle {
290
301
  * reading rather than fail to write one.
291
302
  */
292
303
  listDeliveries?(): Promise<readonly SpeechDelivery[]>;
304
+ /**
305
+ * The languages this engine can speak RIGHT NOW, as BCP 47 tags.
306
+ *
307
+ * Optional, and absent means the host cannot tell, so it says nothing. Answered, it lets the
308
+ * station warn an operator whose station language is not on the list, once, rather than render a
309
+ * German script in an English voice without a word. A primary tag (`de`) covers every region of
310
+ * it (`de-at`).
311
+ *
312
+ * {@link listCues}' three rules apply: answer from what the engine currently IS, keep it cheap,
313
+ * and answer empty rather than throwing when the engine cannot be reached.
314
+ */
315
+ listLanguages?(): Promise<readonly string[]>;
293
316
  /**
294
317
  * What one call to this engine can be given. See {@link SpeechLimits}.
295
318
  *
@@ -1 +1 @@
1
- {"version":3,"file":"speech.d.ts","sourceRoot":"","sources":["../../src/capabilities/speech.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,WAAW,0FAA2F,CAAC;AAEpH,kCAAkC;AAClC,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD,+EAA+E;AAC/E,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,CAEhD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,QAAQ,CAAC,SAAS,CAAM,GAAG,MAAM,CAQhF;AAYD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,iBAAiB,gCAAiC,CAAC;AAEhE,wCAAwC;AACxC,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,+EAA+E;AAC/E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAExE;AAED,wBAAwB;AACxB,MAAM,WAAW,aAAa;IAC1B;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM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C,UAAU,CAAC,CAAC;CACrC;AAED,8CAA8C;AAC9C,MAAM,WAAW,WAAW;IACxB,0DAA0D;IAC1D,EAAE,EAAE,MAAM,CAAC;IAEX,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IAEd,gFAAgF;IAChF,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IACzB;;;;;;;;;OASG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,+BAA+B;AAC/B,MAAM,WAAW,oBAAqB,SAAQ,eAAe;IACzD;;;;;;;;;;OAUG;IACH,KAAK,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAErD;;;;;;OAMG;IACH,UAAU,CAAC,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAEtC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,QAAQ,CAAC,IAAI,OAAO,CAAC,SAAS,SAAS,EAAE,CAAC,CAAC;IAE3C;;;;;;;;;;;;OAYG;IACH,cAAc,CAAC,IAAI,OAAO,CAAC,SAAS,cAAc,EAAE,CAAC,CAAC;IAEtD;;;;;;;;;;OAUG;IACH,aAAa,CAAC,IAAI,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAAC;IAE7C;;;;;;;;;;;;;;;;;;;OAmBG;IACH,UAAU,CAAC,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;CACxC"}
@@ -89,6 +89,14 @@ export interface WeatherQuery {
89
89
  * being optimistic, not a caller being wrong.
90
90
  */
91
91
  days?: number;
92
+ /**
93
+ * The language the station broadcasts in, as a BCP 47 tag, or absent for English.
94
+ *
95
+ * Worth honouring for the PLACE above everything else: {@link WeatherReading.place} is said out
96
+ * loud, and a German station should say "München" rather than "Munich". Ask your service for
97
+ * names in this language where it can give them, and ignore it where it cannot.
98
+ */
99
+ language?: string;
92
100
  }
93
101
  /**
94
102
  * What it is like, at one moment or across one day.
@@ -1 +1 @@
1
- {"version":3,"file":"weather.d.ts","sourceRoot":"","sources":["../../src/capabilities/weather.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH;;;;;;;;GAQG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,KAAK,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,cAAc,GAAG,MAAM,CAAC;AAEzI,sCAAsC;AACtC,MAAM,WAAW,YAAY;IACzB;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;;;;;;OAYG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAC9B,SAAS,EAAE,gBAAgB,CAAC;IAC5B;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kGAAkG;IAClG,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2BAA2B;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8FAA8F;IAC9F,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,+BAA+B;AAC/B,MAAM,WAAW,UAAW,SAAQ,iBAAiB;IACjD;;;;;;OAMG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gCAAgC;IAChC,MAAM,CAAC,EAAE,MAAM,C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AAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAUnD;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAYzE;AAeD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAgBnF"}
1
+ {"version":3,"file":"html.text.d.ts","sourceRoot":"","sources":["../src/html.text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AA4BH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CASpD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAO5E;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMrE;AAkCD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAUnD;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAYzE;AAeD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAgBnF"}
package/dist/index.js CHANGED
@@ -20,6 +20,7 @@ var JSON_SAFE_PAYLOAD_TYPES = [
20
20
  "TrackFetchSession",
21
21
  "TrackFetchRequest",
22
22
  "PlaylistTracksRequest",
23
+ "PluginSocketOptions",
23
24
  "SearchTracksOptions",
24
25
  "ListPlaylistsOptions",
25
26
  "GetPlaylistTracksOptions",
@@ -91,6 +92,7 @@ var JSON_SAFE_PAYLOAD_TYPES = [
91
92
  "OutboundMessage",
92
93
  "MessagingSendResult",
93
94
  "MessagingAnnounceTarget",
95
+ "MessagingCommand",
94
96
  "SpeechLimits"
95
97
  ];
96
98
  var BOUNDARY_METHOD_TYPES = [
@@ -101,6 +103,7 @@ var BOUNDARY_METHOD_TYPES = [
101
103
  "PluginOAuth",
102
104
  "PluginEvents",
103
105
  "PluginTrackFetcher",
106
+ "PluginSocket",
104
107
  "PluginHost",
105
108
  "PluginLifecycle",
106
109
  "MusicProviderCatalog",
@@ -432,7 +435,7 @@ function truncateWords(value, maxChars) {
432
435
  return `${(lastSpace > maxChars - 40 ? cut.slice(0, lastSpace) : cut).trimEnd()}\u2026`;
433
436
  }
434
437
  __name(truncateWords, "truncateWords");
435
- var SENTENCE_END = /[.!?]["'”’)\]]*\s+(?=["'“‘(]?[A-Z0-9])/g;
438
+ var SENTENCE_END = /[.!?]["'”’»)\]]*\s+(?=(?:["'“‘„¿¡(]|«\s?)?[\p{Lu}0-9])/gu;
436
439
  var ABBREVIATIONS = /\b(mr|mrs|ms|dr|prof|rev|st|jr|sr|gov|sen|rep|lt|sgt|col|gen|capt|jan|feb|mar|apr|jun|jul|aug|sept|sep|oct|nov|dec|no|vs|approx|est|inc|ltd|co|dept|univ|u\.s|u\.k)$/i;
437
440
  var endsSentence = /* @__PURE__ */ __name((value, at) => !ABBREVIATIONS.test(value.slice(Math.max(0, at - 12), at)), "endsSentence");
438
441
  function firstSentence(value) {
@@ -1197,6 +1200,7 @@ var pluginPermissionsSchema = z2.object({
1197
1200
  storage: z2.boolean(),
1198
1201
  oauth: z2.boolean(),
1199
1202
  trackFetcher: z2.boolean().optional(),
1203
+ sockets: z2.boolean().optional(),
1200
1204
  grants: z2.array(grantRequestSchema).optional()
1201
1205
  });
1202
1206