@deadair/plugin-sdk 0.13.3 → 0.14.0
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 +63 -0
- package/dist/boundary.json.safe.d.ts +11 -3
- package/dist/boundary.json.safe.d.ts.map +1 -1
- package/dist/capabilities/narration.d.ts +248 -0
- package/dist/capabilities/narration.d.ts.map +1 -0
- package/dist/capabilities/speech.d.ts +41 -0
- package/dist/capabilities/speech.d.ts.map +1 -1
- package/dist/define.plugin.d.ts +3 -0
- package/dist/define.plugin.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/plugin.config.fields.d.ts +10 -1
- package/dist/plugin.config.fields.d.ts.map +1 -1
- package/dist/plugin.manifest.d.ts +21 -1
- package/dist/plugin.manifest.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -652,6 +652,69 @@ crossfading and scrobbling, is wrong for an hour of somebody else's programme.
|
|
|
652
652
|
The station carries an episode the way it carries a programme it made itself:
|
|
653
653
|
one item, aired whole, as speech, when a clock band names the show.
|
|
654
654
|
|
|
655
|
+
## Narrating
|
|
656
|
+
|
|
657
|
+
A `narration` plugin offers text the station reads out, verbatim, as a programme:
|
|
658
|
+
a book by the chapter, a newsletter by the issue, a queue of long reads. Three
|
|
659
|
+
methods, all required:
|
|
660
|
+
|
|
661
|
+
```ts
|
|
662
|
+
async listSeries(): Promise<NarrationSeries[]> {
|
|
663
|
+
return this.books.map(book => ({ id: book.id, title: book.title, order: 'serial',
|
|
664
|
+
author: book.author, language: book.language }));
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
async listPieces({ seriesId, limit }: NarrationPiecesQuery): Promise<NarrationPiece[]> {
|
|
668
|
+
const book = await this.open(seriesId); // [] for an id you do not know
|
|
669
|
+
return book.chapters.slice(0, limit).map((chapter, ordinal) => ({
|
|
670
|
+
id: `${seriesId}:${chapter.key}`, seriesId, seriesTitle: book.title,
|
|
671
|
+
title: chapter.title, ordinal, wordCount: chapter.words,
|
|
672
|
+
}));
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
async getText({ seriesId, pieceId }: NarrationTextQuery): Promise<NarrationText | undefined> {
|
|
676
|
+
const chapter = await this.chapter(seriesId, pieceId);
|
|
677
|
+
if (chapter === undefined) return undefined;
|
|
678
|
+
return { parts: chapter.paragraphs.map(text => ({ text })) }; // one part per paragraph
|
|
679
|
+
}
|
|
680
|
+
```
|
|
681
|
+
|
|
682
|
+
Five things about it are easy to get wrong.
|
|
683
|
+
|
|
684
|
+
**You never make the audio.** The station speaks it, on whichever engine the
|
|
685
|
+
operator chose, which is what gets your text the pronunciation lexicon, the
|
|
686
|
+
performance cues, the presenter's voice and a real loudness measurement. A
|
|
687
|
+
plugin that synthesised would arrive having skipped all of it, and would be
|
|
688
|
+
fighting the presenter for the one engine slot the station has.
|
|
689
|
+
|
|
690
|
+
**Say which ORDER the series is in.** `serial` starts at the beginning and works
|
|
691
|
+
through, once each; `latest` airs the newest piece and nothing once it has
|
|
692
|
+
aired. Nothing can infer it, and the two failures are a book read back to front
|
|
693
|
+
and a newsletter stuck on issue one forever.
|
|
694
|
+
|
|
695
|
+
**An `ordinal` describes the series, not your answer.** Chapter four is `3`
|
|
696
|
+
whether or not the first three were in the page you returned. The station is the
|
|
697
|
+
one keeping its place; `listPieces` is the table of contents, not a cursor, so
|
|
698
|
+
answer a serial from its START and let the host work out what it has aired.
|
|
699
|
+
|
|
700
|
+
**Strip the furniture, and mind the brackets.** `[Illustration: …]`,
|
|
701
|
+
`[Footnote 12]`, page numbers and running heads are not the author's words and a
|
|
702
|
+
listener cannot place them. Square brackets matter twice over, because that is
|
|
703
|
+
how a script marks a sound effect and a performance cue: bracketed text that
|
|
704
|
+
reaches the speech path is read as an instruction rather than as words, so at
|
|
705
|
+
best it disappears and at worst the presenter coughs mid-sentence.
|
|
706
|
+
|
|
707
|
+
**An id is a promise**, on the terms `podcast` sets and for a dearer reason. The
|
|
708
|
+
station remembers what it has rendered and aired by `NarrationPiece.id`, and
|
|
709
|
+
rendering a chapter costs real time on the station's own engine, so a plugin that
|
|
710
|
+
renumbers pays to speak the same chapter twice and then airs it twice.
|
|
711
|
+
|
|
712
|
+
Note what this capability is not: `news`. Both hand over somebody else's words,
|
|
713
|
+
and the line between them is what the station does with them. A news item is a
|
|
714
|
+
fact to MENTION, and what airs is a sentence a model wrote about it; a narration
|
|
715
|
+
piece is read as it stands, and reading it out is the whole programme. A source
|
|
716
|
+
whose text would need summarising is a news source even if it publishes books.
|
|
717
|
+
|
|
655
718
|
## Saying what it is like outside
|
|
656
719
|
|
|
657
720
|
A `weather` plugin has one method, and the caller supplies the place:
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
import type { AnalysisRef, TrackAnalysis, TrackCuePoints, TrackLoudness, TrackTaggedLoudness } from './capabilities/analysis.js';
|
|
39
39
|
import type { AudioJoin, AudioOverlay } from './capabilities/mixer.js';
|
|
40
40
|
import type { ChartDescriptor, ChartEntry, ChartQuery } from './capabilities/charts.js';
|
|
41
|
+
import type { NarrationPart, NarrationPiece, NarrationPiecesQuery, NarrationSeries, NarrationText, NarrationTextQuery } from './capabilities/narration.js';
|
|
41
42
|
import type { NewsFeedDescriptor, NewsItem, NewsQuery } from './capabilities/news.js';
|
|
42
43
|
import type { PodcastAudio, PodcastDirectoryEntry, PodcastDirectoryQuery, PodcastEpisode, PodcastEpisodesQuery, PodcastShow } from './capabilities/podcast.js';
|
|
43
44
|
import type { ScrobblePlay, ScrobbleRejection, ScrobbleResult } from './capabilities/scrobble.js';
|
|
@@ -47,7 +48,7 @@ import type { WeatherConditions, WeatherDay, WeatherQuery, WeatherReading } from
|
|
|
47
48
|
import type { AlbumEnrichment, AlbumRef, ArtistEnrichment, ArtistRef, ExternalId, ExternalLink, SourceDocument, TrackEnrichment, TrackRef } from './capabilities/enrichment.js';
|
|
48
49
|
import type { GetPlaylistTracksOptions, ListPlaylistsOptions, PlaybackState, ProviderPlaylist, ProviderStream, ProviderTrack, SearchTracksOptions } from './capabilities/music.provider.js';
|
|
49
50
|
import type { LlmMessage, LlmModelInfo, LlmRequest, LlmResult, LlmToolCall, LlmToolDeclaration, LlmUsage } from './capabilities/llm.js';
|
|
50
|
-
import type { SpeechRequest, SpeechVoice } from './capabilities/speech.js';
|
|
51
|
+
import type { SpeechLimits, SpeechRequest, SpeechVoice } from './capabilities/speech.js';
|
|
51
52
|
import type { ConfigField, ConfigFieldColumn, ConfigFieldOption } from './plugin.config.fields.js';
|
|
52
53
|
import type { PlaylistTracksRequest, TrackFetchRequest, TrackFetchSession } from './plugin.host.js';
|
|
53
54
|
import type { PluginConnectionResult } from './plugin.lifecycle.js';
|
|
@@ -150,6 +151,12 @@ export type AssertAllBoundaryPayloadsAreJsonSafe = AssertAllTrue<{
|
|
|
150
151
|
NewsFeedDescriptor: IsJsonSafe<NewsFeedDescriptor>;
|
|
151
152
|
NewsQuery: IsJsonSafe<NewsQuery>;
|
|
152
153
|
NewsItem: IsJsonSafe<NewsItem>;
|
|
154
|
+
NarrationSeries: IsJsonSafe<NarrationSeries>;
|
|
155
|
+
NarrationPiece: IsJsonSafe<NarrationPiece>;
|
|
156
|
+
NarrationPart: IsJsonSafe<NarrationPart>;
|
|
157
|
+
NarrationText: IsJsonSafe<NarrationText>;
|
|
158
|
+
NarrationPiecesQuery: IsJsonSafe<NarrationPiecesQuery>;
|
|
159
|
+
NarrationTextQuery: IsJsonSafe<NarrationTextQuery>;
|
|
153
160
|
PodcastShow: IsJsonSafe<PodcastShow>;
|
|
154
161
|
PodcastAudio: IsJsonSafe<PodcastAudio>;
|
|
155
162
|
PodcastEpisode: IsJsonSafe<PodcastEpisode>;
|
|
@@ -167,13 +174,14 @@ export type AssertAllBoundaryPayloadsAreJsonSafe = AssertAllTrue<{
|
|
|
167
174
|
ScrobblePlay: IsJsonSafe<ScrobblePlay>;
|
|
168
175
|
ScrobbleRejection: IsJsonSafe<ScrobbleRejection>;
|
|
169
176
|
ScrobbleResult: IsJsonSafe<ScrobbleResult>;
|
|
177
|
+
SpeechLimits: IsJsonSafe<SpeechLimits>;
|
|
170
178
|
}>;
|
|
171
179
|
/**
|
|
172
180
|
* Names of the interfaces asserted above. Kept as a runtime array so the
|
|
173
181
|
* registry-coverage test can compare it against what is actually exported
|
|
174
182
|
* from the boundary source files.
|
|
175
183
|
*/
|
|
176
|
-
export declare const JSON_SAFE_PAYLOAD_TYPES: readonly ["PluginConnectionResult", "PluginPermissions", "NetworkPermissionHost", "NetworkPermissionFromConfig", "PluginGrantRequest", "ConfigField", "ConfigFieldOption", "ConfigFieldColumn", "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", "PodcastShow", "PodcastAudio", "PodcastEpisode", "PodcastEpisodesQuery", "PodcastDirectoryQuery", "PodcastDirectoryEntry", "SimilarArtist", "ArtistTrack", "SearchQuery", "SearchResult", "WeatherQuery", "WeatherConditions", "WeatherDay", "WeatherReading", "ScrobblePlay", "ScrobbleRejection", "ScrobbleResult"];
|
|
184
|
+
export declare const JSON_SAFE_PAYLOAD_TYPES: readonly ["PluginConnectionResult", "PluginPermissions", "NetworkPermissionHost", "NetworkPermissionFromConfig", "PluginGrantRequest", "ConfigField", "ConfigFieldOption", "ConfigFieldColumn", "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", "ScrobblePlay", "ScrobbleRejection", "ScrobbleResult", "SpeechLimits"];
|
|
177
185
|
/**
|
|
178
186
|
* Boundary interfaces that are deliberately NOT payloads: they describe
|
|
179
187
|
* methods, so they carry functions by definition and can never be JSON-safe.
|
|
@@ -183,7 +191,7 @@ export declare const JSON_SAFE_PAYLOAD_TYPES: readonly ["PluginConnectionResult"
|
|
|
183
191
|
* interfaces explicitly is what makes "is this a payload or a contract?" a
|
|
184
192
|
* conscious decision for anyone adding one, rather than a silent omission.
|
|
185
193
|
*/
|
|
186
|
-
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", "PodcastProvider", "SimilarityProvider", "SearchProvider", "WeatherProvider", "ScrobbleProvider"];
|
|
194
|
+
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", "ScrobbleProvider"];
|
|
187
195
|
/**
|
|
188
196
|
* Boundary interfaces that deliberately carry a LIVE object, and so are neither
|
|
189
197
|
* 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,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,EAAE,kBAAkB,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,KAAK,EACR,YAAY,EACZ,qBAAqB,EACrB,qBAAqB,EACrB,cAAc,EACd,oBAAo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,iBAAiB,CAAC,CAAC;IACjD,UAAU,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IACnC,cAAc,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;IAC3C,YAAY,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;IACvC,iBAAiB,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC;IACjD,cAAc,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;IAC3C,YAAY,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;CAC1C,CAAC,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,k1CA2E1B,CAAC;AAEX;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,shBA4BxB,CAAC;AAEX;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,wEAgB7B,CAAC"}
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `narration` kind. A narration plugin answers "what has the station got to
|
|
3
|
+
* read out", as text somebody else wrote.
|
|
4
|
+
*
|
|
5
|
+
* ## The pair it completes
|
|
6
|
+
*
|
|
7
|
+
* This and `capabilities/news.ts` are the two text sources, and they differ in
|
|
8
|
+
* what the station DOES with the words rather than in where they came from:
|
|
9
|
+
*
|
|
10
|
+
* - A news plugin hands over entries and the station talks ABOUT them. What airs
|
|
11
|
+
* is the station's own sentence, written by a model, in a presenter's voice.
|
|
12
|
+
* - A narration plugin hands over pieces and the station READS one, verbatim, as
|
|
13
|
+
* a programme at a clock band. No model ever writes a word of it.
|
|
14
|
+
*
|
|
15
|
+
* So the question to ask of a source is not what it publishes but whether its
|
|
16
|
+
* words are meant to be heard as they stand. A headline is not: it is a fact to
|
|
17
|
+
* mention. A chapter is: reading it out IS the programme. A source whose text
|
|
18
|
+
* would need summarising is a `news` source even if it publishes books, and one
|
|
19
|
+
* whose text is meant to be spoken whole belongs here even if it publishes news.
|
|
20
|
+
*
|
|
21
|
+
* And separate from `capabilities/podcast.ts`, the third source in this
|
|
22
|
+
* neighbourhood, because a podcast plugin hands over an ADDRESS and the host
|
|
23
|
+
* fetches audio somebody else made. Here the station makes the audio, which is
|
|
24
|
+
* what earns it everything the station's own voice gets: the pronunciation
|
|
25
|
+
* lexicon, the performance cues, the persona, a real loudness measurement rather
|
|
26
|
+
* than an assumed level.
|
|
27
|
+
*
|
|
28
|
+
* ## It offers text, and the station speaks it
|
|
29
|
+
*
|
|
30
|
+
* A plugin must never synthesise. Speech is `capabilities/speech.ts`, it is
|
|
31
|
+
* selected by the operator rather than by whoever wrote the text, and the
|
|
32
|
+
* station holds exactly one engine slot: a second source producing audio on its
|
|
33
|
+
* own schedule would compete with the presenter for the card and would arrive
|
|
34
|
+
* having skipped every stage above. What crosses the boundary here is words,
|
|
35
|
+
* which is also why this capability can afford to hand over the content itself
|
|
36
|
+
* where `podcast` cannot. A chapter is kilobytes and an episode is a hundred
|
|
37
|
+
* megabytes, so `getText` fits inside `host.fetch`'s body bounds with room to
|
|
38
|
+
* spare and needs no second path for bytes.
|
|
39
|
+
*
|
|
40
|
+
* ## A series is carried in one of two orders, and the plugin says which
|
|
41
|
+
*
|
|
42
|
+
* {@link NarrationSeries.order} is the whole of it. A book is a `serial`: it
|
|
43
|
+
* starts at its first chapter and the station works through it in order, once
|
|
44
|
+
* each. A column is `latest`: what airs tonight is the newest issue, and a night
|
|
45
|
+
* it publishes nothing is a night the band declines rather than one the station
|
|
46
|
+
* fills from the archive. Getting this wrong is the difference between a book
|
|
47
|
+
* read back to front and a newsletter stuck on its first issue forever, and no
|
|
48
|
+
* caller can infer it, which is why it is required.
|
|
49
|
+
*
|
|
50
|
+
* ## `id`s are a de-duplication contract
|
|
51
|
+
*
|
|
52
|
+
* `news.ts`'s rule, and for a sharper reason: the station remembers which pieces
|
|
53
|
+
* it has RENDERED and AIRED by {@link NarrationPiece.id}, so a plugin that
|
|
54
|
+
* renumbers has the station pay to speak the same chapter twice and then air it
|
|
55
|
+
* twice. A {@link NarrationSeries.id} is stable in the same way for as long as
|
|
56
|
+
* the operator keeps the series.
|
|
57
|
+
*
|
|
58
|
+
* Every shape here is JSON-safe.
|
|
59
|
+
*/
|
|
60
|
+
/**
|
|
61
|
+
* How a series is worked through.
|
|
62
|
+
*
|
|
63
|
+
* - `serial`: from the beginning, in {@link NarrationPiece.ordinal} order, each
|
|
64
|
+
* piece once. A book, a serialised novel, a lecture course.
|
|
65
|
+
* - `latest`: the newest piece by {@link NarrationPiece.publishedAt}, and
|
|
66
|
+
* nothing once it has aired. A newsletter, a column, a blog.
|
|
67
|
+
*/
|
|
68
|
+
export type NarrationOrder = 'serial' | 'latest';
|
|
69
|
+
/**
|
|
70
|
+
* One thing this plugin can offer to have read out: a book, a column, a queue.
|
|
71
|
+
*
|
|
72
|
+
* `id` is scoped to this plugin and needs to be unique only within it. The host
|
|
73
|
+
* qualifies it before anything outside sees it, so a short flat id is right.
|
|
74
|
+
*/
|
|
75
|
+
export interface NarrationSeries {
|
|
76
|
+
id: string;
|
|
77
|
+
/** What to call it out loud, e.g. `Frankenstein`. A presenter says this when handing over. */
|
|
78
|
+
title: string;
|
|
79
|
+
/** How the station works through it. See {@link NarrationOrder}; no caller can guess it. */
|
|
80
|
+
order: NarrationOrder;
|
|
81
|
+
/** Who wrote it, as the source gives it. Said aloud beside the title, so a person rather than a slug. */
|
|
82
|
+
author?: string;
|
|
83
|
+
/** What the series is about, as PLAIN TEXT. It may reach a model's context and a voice. */
|
|
84
|
+
description?: string;
|
|
85
|
+
/** Artwork for the console and the mount. Always http(s), and stable across calls. */
|
|
86
|
+
artworkUrl?: string;
|
|
87
|
+
/** Where the series lives for a person. */
|
|
88
|
+
homeUrl?: string;
|
|
89
|
+
/**
|
|
90
|
+
* ISO 639-1, or the source's own tag (`en-gb`), when the plugin knows.
|
|
91
|
+
*
|
|
92
|
+
* Not decoration: the host splits a long piece at SENTENCE boundaries before
|
|
93
|
+
* speaking it, and where a sentence ends is a question about the language.
|
|
94
|
+
*/
|
|
95
|
+
language?: string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* One instalment: a chapter, an issue, an article.
|
|
99
|
+
*
|
|
100
|
+
* What is required depends on the series' {@link NarrationSeries.order}, and a
|
|
101
|
+
* piece missing the field its order needs is one the host drops, because it
|
|
102
|
+
* cannot be placed in the sequence: `ordinal` for a `serial`, `publishedAt` for
|
|
103
|
+
* a `latest`. Supplying both is fine and often right.
|
|
104
|
+
*/
|
|
105
|
+
export interface NarrationPiece {
|
|
106
|
+
/** Stable across calls. See the de-duplication contract in this file's header. */
|
|
107
|
+
id: string;
|
|
108
|
+
/** The {@link NarrationSeries.id} this belongs to, as the plugin's own unqualified id. */
|
|
109
|
+
seriesId: string;
|
|
110
|
+
/** That series' title, so a caller reading one list can say what it is part of. */
|
|
111
|
+
seriesTitle: string;
|
|
112
|
+
/** What this piece is called, e.g. `Chapter 4: The laboratory`. Said aloud. */
|
|
113
|
+
title: string;
|
|
114
|
+
/**
|
|
115
|
+
* Where it comes in a `serial`, counting from 0.
|
|
116
|
+
*
|
|
117
|
+
* The station's own position in the book, so it has to describe the SERIES
|
|
118
|
+
* rather than this listing: the fourth chapter is `3` whether or not the
|
|
119
|
+
* first three were in the answer. Ignored for a `latest` series.
|
|
120
|
+
*/
|
|
121
|
+
ordinal?: number;
|
|
122
|
+
/**
|
|
123
|
+
* ISO-8601. Never a `Date`, and absent when the source published no readable one.
|
|
124
|
+
*
|
|
125
|
+
* What a `latest` series is ordered by, and undated pieces there never count
|
|
126
|
+
* as newest: there is nothing to say they are.
|
|
127
|
+
*/
|
|
128
|
+
publishedAt?: string;
|
|
129
|
+
/**
|
|
130
|
+
* What the piece is about, as PLAIN TEXT.
|
|
131
|
+
*
|
|
132
|
+
* The line a presenter reaches for when introducing it, which is why it has
|
|
133
|
+
* to be plain. Never the text itself: that is {@link NarrationProvider.getText}.
|
|
134
|
+
*/
|
|
135
|
+
summary?: string;
|
|
136
|
+
/** The piece's page, for a person. */
|
|
137
|
+
url?: string;
|
|
138
|
+
/**
|
|
139
|
+
* Roughly how many words it runs to.
|
|
140
|
+
*
|
|
141
|
+
* The only length the station has before it has spoken anything, so it is
|
|
142
|
+
* what the running order is projected against while the audio is still being
|
|
143
|
+
* made. A rough count is far better than none: without it a twenty-minute
|
|
144
|
+
* chapter projects as nothing and every band behind it is planned an hour early.
|
|
145
|
+
*/
|
|
146
|
+
wordCount?: number;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* One run of text to be spoken.
|
|
150
|
+
*
|
|
151
|
+
* An object rather than a bare string, deliberately. Everything the station
|
|
152
|
+
* currently does needs only `text`, and a `string[]` would say so more simply.
|
|
153
|
+
* But the next thing anybody will want is a piece with more than one voice in
|
|
154
|
+
* it (a play, a dialogue, a letters page read by two presenters), and that wants
|
|
155
|
+
* a `role` beside the words. Adding a field to an object is a change every
|
|
156
|
+
* plugin already written survives; replacing a `string` with an object is not.
|
|
157
|
+
*
|
|
158
|
+
* Split the text the way it READS: a paragraph per part. The host packs parts
|
|
159
|
+
* into as few speech calls as the engine's own limit allows, and it may split
|
|
160
|
+
* inside one that is too long, but it never joins across a boundary you drew
|
|
161
|
+
* without the pause a paragraph implies.
|
|
162
|
+
*/
|
|
163
|
+
export interface NarrationPart {
|
|
164
|
+
/**
|
|
165
|
+
* PLAIN TEXT, and what the station will say out loud, exactly as it stands.
|
|
166
|
+
*
|
|
167
|
+
* Two things to strip before handing it over, because nothing downstream
|
|
168
|
+
* can tell them from the prose. Editorial furniture (`[Illustration: …]`,
|
|
169
|
+
* `[Footnote 12]`, page numbers, running heads) is not the author's words
|
|
170
|
+
* and a listener has no idea what to do with it. And square brackets in
|
|
171
|
+
* particular are how the station marks a performance cue and a sound effect
|
|
172
|
+
* in a script, so bracketed text reaching the speech path is read as an
|
|
173
|
+
* instruction rather than as words: at best it vanishes, at worst the
|
|
174
|
+
* presenter coughs in the middle of a sentence.
|
|
175
|
+
*/
|
|
176
|
+
text: string;
|
|
177
|
+
}
|
|
178
|
+
/** The words of one piece. */
|
|
179
|
+
export interface NarrationText {
|
|
180
|
+
/** In reading order. An empty array is not a piece the station can air. */
|
|
181
|
+
parts: NarrationPart[];
|
|
182
|
+
}
|
|
183
|
+
/** What a narration source is asked when the host wants a series' instalments. */
|
|
184
|
+
export interface NarrationPiecesQuery {
|
|
185
|
+
/** A {@link NarrationSeries.id} this plugin offered. */
|
|
186
|
+
seriesId: string;
|
|
187
|
+
/** How many to return. A plugin may return fewer; it must not return more. */
|
|
188
|
+
limit: number;
|
|
189
|
+
}
|
|
190
|
+
/** What a narration source is asked when the station is ready to speak one. */
|
|
191
|
+
export interface NarrationTextQuery {
|
|
192
|
+
seriesId: string;
|
|
193
|
+
/** A {@link NarrationPiece.id} this plugin offered for that series. */
|
|
194
|
+
pieceId: string;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Implemented by a `narration` plugin.
|
|
198
|
+
*/
|
|
199
|
+
export interface NarrationProvider {
|
|
200
|
+
/**
|
|
201
|
+
* What this plugin can offer, right now.
|
|
202
|
+
*
|
|
203
|
+
* Asked per call rather than cached by the host, for the reason
|
|
204
|
+
* `NewsProvider.listFeeds` is: an operator editing a series list
|
|
205
|
+
* reinitializes the plugin, and a list built from a config field would
|
|
206
|
+
* otherwise be a boot snapshot of a setting that has since changed.
|
|
207
|
+
*
|
|
208
|
+
* An empty array is an ordinary answer. A plugin nobody has pointed at
|
|
209
|
+
* anything yet has nothing to offer, and that is not a failure.
|
|
210
|
+
*/
|
|
211
|
+
listSeries(): Promise<NarrationSeries[]>;
|
|
212
|
+
/**
|
|
213
|
+
* A series' pieces, in the order that series is worked through: a `serial`
|
|
214
|
+
* from its beginning, a `latest` newest first.
|
|
215
|
+
*
|
|
216
|
+
* The station keeps what it is told here, so a `serial` must be answered
|
|
217
|
+
* from the START rather than from wherever the station has reached: it is
|
|
218
|
+
* the table of contents, not a cursor, and the host is the one that knows
|
|
219
|
+
* which pieces have aired. `limit` is the host's page size and a serial
|
|
220
|
+
* longer than it is read across calls.
|
|
221
|
+
*
|
|
222
|
+
* Return `[]` for a `seriesId` you do not recognise rather than throwing,
|
|
223
|
+
* since the host asks the plugin that named the id and an unknown one is a
|
|
224
|
+
* stale request. The same goes for a series that could not be read: one
|
|
225
|
+
* failing series must not cost the others.
|
|
226
|
+
*/
|
|
227
|
+
listPieces(query: NarrationPiecesQuery): Promise<NarrationPiece[]>;
|
|
228
|
+
/**
|
|
229
|
+
* The words of one piece, fetched when the station is about to speak it.
|
|
230
|
+
*
|
|
231
|
+
* Separate from {@link listPieces} because of what each costs: a listing is
|
|
232
|
+
* read whenever a console page opens, and a piece is a whole chapter, wanted
|
|
233
|
+
* once in its life. Handing the text over with the listing would mean
|
|
234
|
+
* carrying a book every time somebody looked at a menu.
|
|
235
|
+
*
|
|
236
|
+
* `undefined` for a piece you cannot produce text for, which the host
|
|
237
|
+
* records as a failure against that piece and moves on. Do not answer with
|
|
238
|
+
* an empty {@link NarrationText} to mean the same thing: an empty piece is
|
|
239
|
+
* indistinguishable from a chapter of blank pages, and the station reports
|
|
240
|
+
* the two differently.
|
|
241
|
+
*
|
|
242
|
+
* This one call may take a while, since a source that has to be fetched and
|
|
243
|
+
* parsed is the normal case, and the host gives it a budget to match: far
|
|
244
|
+
* longer than a listing gets. Watch `host.signal` and give up when it does.
|
|
245
|
+
*/
|
|
246
|
+
getText(query: NarrationTextQuery): Promise<NarrationText | undefined>;
|
|
247
|
+
}
|
|
248
|
+
//# sourceMappingURL=narration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"narration.d.ts","sourceRoot":"","sources":["../../src/capabilities/narration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AAEH;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC5B,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AM,WAAW,kBAAkB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,uEAAuE;IACvE,OAAO,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;;;;;;;OAUG;IACH,UAAU,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;IAEzC;;;;;;;;;;;;;;OAcG;IACH,UAAU,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IAEnE;;;;;;;;;;;;;;;;;OAiBG;IACH,OAAO,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC;CAC1E"}
|
|
@@ -213,6 +213,26 @@ export interface SpeechVoice {
|
|
|
213
213
|
*/
|
|
214
214
|
spec?: string;
|
|
215
215
|
}
|
|
216
|
+
/**
|
|
217
|
+
* What one `speak` can be given, where the engine has a limit worth declaring.
|
|
218
|
+
*
|
|
219
|
+
* Every field is optional and absent means "no limit this plugin knows of",
|
|
220
|
+
* which is the ordinary answer: most engines take a sentence and most callers
|
|
221
|
+
* send one.
|
|
222
|
+
*/
|
|
223
|
+
export interface SpeechLimits {
|
|
224
|
+
/**
|
|
225
|
+
* The most characters one {@link SpeechRequest.text} may hold.
|
|
226
|
+
*
|
|
227
|
+
* A ceiling on ONE call rather than a budget for the work: a caller with more
|
|
228
|
+
* text than this splits it and asks several times, which is what the station
|
|
229
|
+
* does when it reads something long out. Answer the engine's own documented
|
|
230
|
+
* limit and nothing tighter. A plugin guessing low costs the station an extra
|
|
231
|
+
* seam in the middle of a sentence, and a seam is audible where a slightly
|
|
232
|
+
* longer call is not.
|
|
233
|
+
*/
|
|
234
|
+
maxCharacters?: number;
|
|
235
|
+
}
|
|
216
236
|
/** A plugin that can speak. */
|
|
217
237
|
export interface SpeechPluginInstance extends PluginLifecycle {
|
|
218
238
|
/**
|
|
@@ -270,5 +290,26 @@ export interface SpeechPluginInstance extends PluginLifecycle {
|
|
|
270
290
|
* reading rather than fail to write one.
|
|
271
291
|
*/
|
|
272
292
|
listDeliveries?(): Promise<readonly SpeechDelivery[]>;
|
|
293
|
+
/**
|
|
294
|
+
* What one call to this engine can be given. See {@link SpeechLimits}.
|
|
295
|
+
*
|
|
296
|
+
* Optional, and absent means the host uses a conservative default rather than
|
|
297
|
+
* assuming there is no limit. That is the opposite of {@link listCues}'
|
|
298
|
+
* default, and deliberately so, because the two fail in opposite directions. An unclaimed cue
|
|
299
|
+
* is stripped and the break is plainer; an unknown ceiling that turns out to
|
|
300
|
+
* be real is a request the engine REFUSES, which reads as a broken plugin
|
|
301
|
+
* rather than a long one: the error is an upstream failure like any other and
|
|
302
|
+
* three of those in a row quarantine the plugin.
|
|
303
|
+
*
|
|
304
|
+
* So declare one if the engine documents one. It is worth the method for the
|
|
305
|
+
* case the station cannot otherwise get right: reading something long out
|
|
306
|
+
* loud, where the text is somebody else's and its length is not the station's
|
|
307
|
+
* to choose.
|
|
308
|
+
*
|
|
309
|
+
* {@link listCues}' three rules apply: answer from what the engine currently
|
|
310
|
+
* IS, keep it cheap, and answer empty rather than throwing when the engine
|
|
311
|
+
* cannot be reached.
|
|
312
|
+
*/
|
|
313
|
+
listLimits?(): Promise<SpeechLimits>;
|
|
273
314
|
}
|
|
274
315
|
//# sourceMappingURL=speech.d.ts.map
|
|
@@ -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,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;IACH,UAAU,CAAC,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;CACxC"}
|
package/dist/define.plugin.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ChartsProvider } from './capabilities/charts.js';
|
|
2
2
|
import type { EnrichmentProvider } from './capabilities/enrichment.js';
|
|
3
3
|
import type { MusicProviderCatalog, MusicProviderOAuth, MusicProviderSteer, MusicProviderStream } from './capabilities/music.provider.js';
|
|
4
|
+
import type { NarrationProvider } from './capabilities/narration.js';
|
|
4
5
|
import type { NewsProvider } from './capabilities/news.js';
|
|
5
6
|
import type { PodcastProvider } from './capabilities/podcast.js';
|
|
6
7
|
import type { ScrobbleProvider } from './capabilities/scrobble.js';
|
|
@@ -36,6 +37,8 @@ export type EnrichmentPluginInstance = PluginLifecycle & EnrichmentProvider;
|
|
|
36
37
|
export type ChartsPluginInstance = PluginLifecycle & ChartsProvider;
|
|
37
38
|
/** Instance shape for a `news` plugin. */
|
|
38
39
|
export type NewsPluginInstance = PluginLifecycle & NewsProvider;
|
|
40
|
+
/** Instance shape for a `narration` plugin. */
|
|
41
|
+
export type NarrationPluginInstance = PluginLifecycle & NarrationProvider;
|
|
39
42
|
/** Instance shape for a `podcast` plugin. `searchShows` stays optional, as it is on the capability. */
|
|
40
43
|
export type PodcastPluginInstance = PluginLifecycle & PodcastProvider;
|
|
41
44
|
/** Instance shape for a `similarity` plugin. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define.plugin.d.ts","sourceRoot":"","sources":["../src/define.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC1I,OAAO,KAAK,EAAE,YAAY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CAAC;AAExE;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,SAAS,SAAS,cAAc,EACzD,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,GAClC,aAAa,CAAC,SAAS,CAAC,CAE1B"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './capabilities/enrichment.js';
|
|
|
5
5
|
export * from './capabilities/llm.js';
|
|
6
6
|
export * from './capabilities/mixer.js';
|
|
7
7
|
export * from './capabilities/music.provider.js';
|
|
8
|
+
export * from './capabilities/narration.js';
|
|
8
9
|
export * from './capabilities/news.js';
|
|
9
10
|
export * from './capabilities/podcast.js';
|
|
10
11
|
export * from './capabilities/scrobble.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kCAAkC,CAAC;AACjD,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -54,6 +54,12 @@ var JSON_SAFE_PAYLOAD_TYPES = [
|
|
|
54
54
|
"NewsFeedDescriptor",
|
|
55
55
|
"NewsQuery",
|
|
56
56
|
"NewsItem",
|
|
57
|
+
"NarrationSeries",
|
|
58
|
+
"NarrationPiece",
|
|
59
|
+
"NarrationPart",
|
|
60
|
+
"NarrationText",
|
|
61
|
+
"NarrationPiecesQuery",
|
|
62
|
+
"NarrationTextQuery",
|
|
57
63
|
"PodcastShow",
|
|
58
64
|
"PodcastAudio",
|
|
59
65
|
"PodcastEpisode",
|
|
@@ -70,7 +76,8 @@ var JSON_SAFE_PAYLOAD_TYPES = [
|
|
|
70
76
|
"WeatherReading",
|
|
71
77
|
"ScrobblePlay",
|
|
72
78
|
"ScrobbleRejection",
|
|
73
|
-
"ScrobbleResult"
|
|
79
|
+
"ScrobbleResult",
|
|
80
|
+
"SpeechLimits"
|
|
74
81
|
];
|
|
75
82
|
var BOUNDARY_METHOD_TYPES = [
|
|
76
83
|
"PluginLogger",
|
|
@@ -94,6 +101,7 @@ var BOUNDARY_METHOD_TYPES = [
|
|
|
94
101
|
"MixerProvider",
|
|
95
102
|
"ChartsProvider",
|
|
96
103
|
"NewsProvider",
|
|
104
|
+
"NarrationProvider",
|
|
97
105
|
"PodcastProvider",
|
|
98
106
|
"SimilarityProvider",
|
|
99
107
|
"SearchProvider",
|
|
@@ -996,6 +1004,7 @@ var configFieldOptionSourceSchema = z.enum([
|
|
|
996
1004
|
"station.newsCategories",
|
|
997
1005
|
"station.newsFeeds",
|
|
998
1006
|
"station.podcastShows",
|
|
1007
|
+
"station.narrationSeries",
|
|
999
1008
|
"intl.timeZones",
|
|
1000
1009
|
"plugins.speech",
|
|
1001
1010
|
"plugins.llm",
|
|
@@ -1148,6 +1157,7 @@ var PLUGIN_CAPABILITY_ANALYSIS = "analysis";
|
|
|
1148
1157
|
var PLUGIN_CAPABILITY_MIXER = "mixer";
|
|
1149
1158
|
var PLUGIN_CAPABILITY_CHARTS = "charts";
|
|
1150
1159
|
var PLUGIN_CAPABILITY_NEWS = "news";
|
|
1160
|
+
var PLUGIN_CAPABILITY_NARRATION = "narration";
|
|
1151
1161
|
var PLUGIN_CAPABILITY_PODCAST = "podcast";
|
|
1152
1162
|
var PLUGIN_CAPABILITY_SIMILARITY = "similarity";
|
|
1153
1163
|
var PLUGIN_CAPABILITY_SEARCH = "search";
|
|
@@ -1165,6 +1175,7 @@ var KNOWN_PLUGIN_CAPABILITIES = [
|
|
|
1165
1175
|
PLUGIN_CAPABILITY_MIXER,
|
|
1166
1176
|
PLUGIN_CAPABILITY_CHARTS,
|
|
1167
1177
|
PLUGIN_CAPABILITY_NEWS,
|
|
1178
|
+
PLUGIN_CAPABILITY_NARRATION,
|
|
1168
1179
|
PLUGIN_CAPABILITY_PODCAST,
|
|
1169
1180
|
PLUGIN_CAPABILITY_SIMILARITY,
|
|
1170
1181
|
PLUGIN_CAPABILITY_SEARCH,
|
|
@@ -1213,6 +1224,7 @@ export {
|
|
|
1213
1224
|
PLUGIN_CAPABILITY_ENRICHMENT,
|
|
1214
1225
|
PLUGIN_CAPABILITY_LLM,
|
|
1215
1226
|
PLUGIN_CAPABILITY_MIXER,
|
|
1227
|
+
PLUGIN_CAPABILITY_NARRATION,
|
|
1216
1228
|
PLUGIN_CAPABILITY_NEWS,
|
|
1217
1229
|
PLUGIN_CAPABILITY_OAUTH,
|
|
1218
1230
|
PLUGIN_CAPABILITY_PODCAST,
|