@deadair/plugin-sdk 0.57.0 → 0.58.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 +33 -0
- package/dist/article.parse.d.ts +24 -0
- package/dist/article.parse.d.ts.map +1 -1
- package/dist/boundary.json.safe.d.ts +4 -2
- package/dist/boundary.json.safe.d.ts.map +1 -1
- package/dist/capabilities/enrichment.d.ts +22 -0
- package/dist/capabilities/enrichment.d.ts.map +1 -1
- package/dist/capabilities/news.d.ts +19 -0
- package/dist/capabilities/news.d.ts.map +1 -1
- package/dist/index.js +47 -2
- package/dist/index.js.map +1 -1
- package/dist/plugin.config.fields.d.ts +2 -2
- package/dist/plugin.manifest.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -696,10 +696,43 @@ prose worth extracting claims from, declare `enrichment` too and return it as a
|
|
|
696
696
|
a rate limit and a query nothing matched are one outcome to every caller. Throw
|
|
697
697
|
only for something the operator has to go and fix.
|
|
698
698
|
|
|
699
|
+
**A subject that is not a record goes through enrichment, too.** When an
|
|
700
|
+
operator asks the station to research a programme's subject, the host asks
|
|
701
|
+
every `enrichment` plugin that implements the optional
|
|
702
|
+
`enrichTopic({ query })` for `documents` about it, and reads them for claims
|
|
703
|
+
exactly as it reads an artist's. Hand back only pages your plugin has the
|
|
704
|
+
operator's leave to quote; the web search plugin answers from its trusted sites
|
|
705
|
+
and nowhere else.
|
|
706
|
+
|
|
699
707
|
Note what `search` is not. Looking for something to PLAY is `searchTracks` on
|
|
700
708
|
the catalog capability, which answers with provider ids the station can resolve
|
|
701
709
|
into audio. Nothing a search plugin returns can be scheduled.
|
|
702
710
|
|
|
711
|
+
## Reading a page somebody named
|
|
712
|
+
|
|
713
|
+
A `news` plugin may implement one optional method more, `readPage`, and the
|
|
714
|
+
station asks it when an operator gives a production a web page to make a
|
|
715
|
+
programme about:
|
|
716
|
+
|
|
717
|
+
```ts
|
|
718
|
+
async readPage(url: string): Promise<SourceDocument | undefined> {
|
|
719
|
+
return await readDocument(this.host, url, { timeoutMs: 15_000 });
|
|
720
|
+
}
|
|
721
|
+
```
|
|
722
|
+
|
|
723
|
+
`readDocument` in `article.parse.ts` is the whole of a typical implementation:
|
|
724
|
+
it fetches the page through `host.fetch`, keeps its prose the way
|
|
725
|
+
`fetchArticle` does but far more of it (`DOCUMENT_MAX_CHARS`), and takes the
|
|
726
|
+
title the page gives itself (`extractTitle`: its `og:title`, then `<title>`,
|
|
727
|
+
then the first `<h1>`).
|
|
728
|
+
|
|
729
|
+
It belongs on a plugin that can already open whatever page a feed links to,
|
|
730
|
+
because that is the only kind with a network grant wide enough: the address is
|
|
731
|
+
on no allowlist a manifest could write down, so the plugin needs
|
|
732
|
+
`network.open`, which the operator answers. Answer `undefined` for a page with
|
|
733
|
+
no prose on it. Throw for one that could not be read, and the station says
|
|
734
|
+
which site it was when it fails the production.
|
|
735
|
+
|
|
703
736
|
## Carrying podcasts
|
|
704
737
|
|
|
705
738
|
A `podcast` plugin says what programmes the station subscribes to and what each
|
package/dist/article.parse.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { HostFetchInit, PluginHost } from './plugin.host.js';
|
|
2
|
+
import type { SourceDocument } from './capabilities/enrichment.js';
|
|
2
3
|
/**
|
|
3
4
|
* The story behind a headline, as the paragraphs somebody else published.
|
|
4
5
|
*
|
|
@@ -82,4 +83,27 @@ export declare function extractArticle(html: string, maxChars?: number): string
|
|
|
82
83
|
export declare function fetchArticle(host: PluginHost, url: string, init?: HostFetchInit, options?: {
|
|
83
84
|
maxChars?: number;
|
|
84
85
|
}): Promise<string | undefined>;
|
|
86
|
+
/**
|
|
87
|
+
* A whole page as a document: its prose, the title it gives itself, where it is and when it was read.
|
|
88
|
+
*
|
|
89
|
+
* {@link fetchArticle} with the page's title kept, for a caller that is handed an address and nothing
|
|
90
|
+
* else, which is a page somebody asked the station to make a programme about rather than a story whose
|
|
91
|
+
* headline a feed already supplied. `options.maxChars` defaults far higher than a bulletin's
|
|
92
|
+
* {@link ARTICLE_MAX_CHARS}, since what reads this is a research pass taking notes rather than a
|
|
93
|
+
* presenter reading a sentence. `undefined` for a page with no prose on it, as for a PDF, which is an
|
|
94
|
+
* ordinary answer; a refused or failed request throws, as {@link fetchArticle} does.
|
|
95
|
+
*/
|
|
96
|
+
export declare function readDocument(host: PluginHost, url: string, init?: HostFetchInit, options?: {
|
|
97
|
+
maxChars?: number;
|
|
98
|
+
}): Promise<SourceDocument | undefined>;
|
|
99
|
+
/** How much of a page {@link readDocument} keeps by default: about three thousand words. */
|
|
100
|
+
export declare const DOCUMENT_MAX_CHARS = 20000;
|
|
101
|
+
/**
|
|
102
|
+
* What a page calls itself: its `og:title`, then its `<title>`, then its first `<h1>`.
|
|
103
|
+
*
|
|
104
|
+
* The Open Graph title first, because it is the one a publisher writes for somebody sharing the page
|
|
105
|
+
* and so the one without the site's name glued on the end, which a `<title>` usually has. `undefined`
|
|
106
|
+
* for a page that names itself nowhere.
|
|
107
|
+
*/
|
|
108
|
+
export declare function extractTitle(html: string): string | undefined;
|
|
85
109
|
//# sourceMappingURL=article.parse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"article.parse.d.ts","sourceRoot":"","sources":["../src/article.parse.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"article.parse.d.ts","sourceRoot":"","sources":["../src/article.parse.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,OAAQ,CAAC;AA8LvC;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,MAA0B,GAAG,MAAM,GAAG,SAAS,CAgCrG;AA2BD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,YAAY,CAC9B,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,aAAa,EACpB,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAChC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAG7B;AAED;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAC9B,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,aAAa,EACpB,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAChC,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC,CAQrC;AAED,4FAA4F;AAC5F,eAAO,MAAM,kBAAkB,QAAS,CAAC;AAKzC;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAgB7D"}
|
|
@@ -50,7 +50,7 @@ import type { ScrobblePlay, ScrobbleRejection, ScrobbleResult } from './capabili
|
|
|
50
50
|
import type { SearchQuery, SearchResult } from './capabilities/search.js';
|
|
51
51
|
import type { ArtistTrack, SimilarArtist } from './capabilities/similarity.js';
|
|
52
52
|
import type { WeatherConditions, WeatherDay, WeatherQuery, WeatherReading } from './capabilities/weather.js';
|
|
53
|
-
import type { AlbumEnrichment, AlbumRef, ArtistEnrichment, ArtistRef, ExternalId, ExternalLink, SourceDocument, TrackEnrichment, TrackRef } from './capabilities/enrichment.js';
|
|
53
|
+
import type { AlbumEnrichment, AlbumRef, ArtistEnrichment, ArtistRef, ExternalId, ExternalLink, SourceDocument, TopicEnrichment, TopicRef, TrackEnrichment, TrackRef } from './capabilities/enrichment.js';
|
|
54
54
|
import type { GetPlaylistTracksOptions, ListPlaylistsOptions, PlaybackReport, PlaybackState, ProviderPlaylist, ProviderStream, ProviderTrack, SearchTracksOptions } from './capabilities/music.provider.js';
|
|
55
55
|
import type { LlmMessage, LlmModelInfo, LlmRequest, LlmResult, LlmToolCall, LlmToolDeclaration, LlmUsage } from './capabilities/llm.js';
|
|
56
56
|
import type { SpeechLimits, SpeechRequest, SpeechVoice } from './capabilities/speech.js';
|
|
@@ -142,6 +142,8 @@ export type AssertAllBoundaryPayloadsAreJsonSafe = AssertAllTrue<{
|
|
|
142
142
|
TrackEnrichment: IsJsonSafe<TrackEnrichment>;
|
|
143
143
|
ArtistEnrichment: IsJsonSafe<ArtistEnrichment>;
|
|
144
144
|
AlbumEnrichment: IsJsonSafe<AlbumEnrichment>;
|
|
145
|
+
TopicRef: IsJsonSafe<TopicRef>;
|
|
146
|
+
TopicEnrichment: IsJsonSafe<TopicEnrichment>;
|
|
145
147
|
SpeechRequest: IsJsonSafe<SpeechRequest>;
|
|
146
148
|
SpeechVoice: IsJsonSafe<SpeechVoice>;
|
|
147
149
|
LlmMessage: IsJsonSafe<LlmMessage>;
|
|
@@ -217,7 +219,7 @@ export type AssertAllBoundaryPayloadsAreJsonSafe = AssertAllTrue<{
|
|
|
217
219
|
* registry-coverage test can compare it against what is actually exported
|
|
218
220
|
* from the boundary source files.
|
|
219
221
|
*/
|
|
220
|
-
export declare const JSON_SAFE_PAYLOAD_TYPES: readonly ["PluginConnectionResult", "PluginPermissions", "NetworkPermissionHost", "NetworkPermissionFromConfig", "PluginGrantRequest", "ConfigField", "ConfigFieldOption", "ConfigFieldColumn", "ConfigFieldPreset", "PluginManifest", "ProviderTrack", "ProviderPlaylist", "ProviderStream", "TrackFetchSession", "TrackFetchRequest", "PlayerFetchRequest", "PlaylistTracksRequest", "PluginSocketOptions", "PluginTlsOptions", "DiscoveryOptions", "DiscoveredService", "SearchTracksOptions", "ListPlaylistsOptions", "GetPlaylistTracksOptions", "PlaybackReport", "PlaybackState", "TrackRef", "ArtistRef", "AlbumRef", "ExternalId", "ExternalLink", "SourceDocument", "TrackEnrichment", "ArtistEnrichment", "AlbumEnrichment", "SpeechRequest", "SpeechVoice", "LlmMessage", "LlmToolDeclaration", "LlmToolCall", "LlmUsage", "LlmRequest", "LlmResult", "LlmModelInfo", "AnalysisRef", "AudioJoin", "AudioOverlay", "AudioTranscode", "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", "OutputDevice", "OutputMetadata", "OutputPlayRequest", "OutputMetadataRequest", "OutputStatus", "LyricLine", "LyricWord", "TrackLyrics", "SpeechLimits"];
|
|
222
|
+
export declare const JSON_SAFE_PAYLOAD_TYPES: readonly ["PluginConnectionResult", "PluginPermissions", "NetworkPermissionHost", "NetworkPermissionFromConfig", "PluginGrantRequest", "ConfigField", "ConfigFieldOption", "ConfigFieldColumn", "ConfigFieldPreset", "PluginManifest", "ProviderTrack", "ProviderPlaylist", "ProviderStream", "TrackFetchSession", "TrackFetchRequest", "PlayerFetchRequest", "PlaylistTracksRequest", "PluginSocketOptions", "PluginTlsOptions", "DiscoveryOptions", "DiscoveredService", "SearchTracksOptions", "ListPlaylistsOptions", "GetPlaylistTracksOptions", "PlaybackReport", "PlaybackState", "TrackRef", "ArtistRef", "AlbumRef", "ExternalId", "ExternalLink", "SourceDocument", "TrackEnrichment", "ArtistEnrichment", "AlbumEnrichment", "TopicRef", "TopicEnrichment", "SpeechRequest", "SpeechVoice", "LlmMessage", "LlmToolDeclaration", "LlmToolCall", "LlmUsage", "LlmRequest", "LlmResult", "LlmModelInfo", "AnalysisRef", "AudioJoin", "AudioOverlay", "AudioTranscode", "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", "OutputDevice", "OutputMetadata", "OutputPlayRequest", "OutputMetadataRequest", "OutputStatus", "LyricLine", "LyricWord", "TrackLyrics", "SpeechLimits"];
|
|
221
223
|
/**
|
|
222
224
|
* Boundary interfaces that are deliberately NOT payloads: they describe
|
|
223
225
|
* methods, so they carry functions by definition and can never be JSON-safe.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boundary.json.safe.d.ts","sourceRoot":"","sources":["../src/boundary.json.safe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,K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E,UAAU,CAAC,eAAe,CAAC,CAAC;IAC7C,eAAe,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC;IAC7C,cAAc,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;IAC3C,qBAAqB,EAAE,UAAU,CAAC,qBAAqB,CAAC,CAAC;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;IACvC,cAAc,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;IAC3C,iBAAiB,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC;IACjD,qBAAqB,EAAE,UAAU,CAAC,qBAAqB,CAAC,CAAC;IACzD,YAAY,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;IACvC,SAAS,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IACjC,SAAS,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IACjC,WAAW,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IACrC,YAAY,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;CAC1C,CAAC,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,o7DA2G1B,CAAC;AAEX;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,0pBAmCxB,CAAC;AAEX;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,2FAmB7B,CAAC"}
|
|
@@ -268,5 +268,27 @@ export interface EnrichmentProvider {
|
|
|
268
268
|
enrichArtist?(ref: ArtistRef): Promise<Partial<ArtistEnrichment>>;
|
|
269
269
|
/** The album equivalent of {@link enrichArtist}, asked once per record. */
|
|
270
270
|
enrichAlbum?(ref: AlbumRef): Promise<Partial<AlbumEnrichment>>;
|
|
271
|
+
/**
|
|
272
|
+
* Background on a subject that is not a record at all: what an operator
|
|
273
|
+
* asked the station to make a programme about. Optional, as
|
|
274
|
+
* {@link enrichArtist} is, and asked only when a production is to be
|
|
275
|
+
* researched rather than written from general knowledge.
|
|
276
|
+
*
|
|
277
|
+
* Answer with {@link SourceDocument}s, the same prose an artist's
|
|
278
|
+
* `documents` carry: the host reads them for claims it can check against
|
|
279
|
+
* the text, so the pages have to be ones your plugin has the operator's
|
|
280
|
+
* leave to quote. `{}` when you have nothing, which is an ordinary answer.
|
|
281
|
+
*/
|
|
282
|
+
enrichTopic?(topic: TopicRef): Promise<Partial<TopicEnrichment>>;
|
|
283
|
+
}
|
|
284
|
+
/** How an enrichment plugin is asked about a subject that is not a record. */
|
|
285
|
+
export interface TopicRef {
|
|
286
|
+
/** What the programme is about, in the operator's words. */
|
|
287
|
+
query: string;
|
|
288
|
+
}
|
|
289
|
+
/** What an enrichment plugin knows about a subject that is not a record. */
|
|
290
|
+
export interface TopicEnrichment {
|
|
291
|
+
/** Pages about it, as prose the host reads for claims. */
|
|
292
|
+
documents: SourceDocument[];
|
|
271
293
|
}
|
|
272
294
|
//# sourceMappingURL=enrichment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enrichment.d.ts","sourceRoot":"","sources":["../../src/capabilities/enrichment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACrB,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MA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AAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC;IAE/D;;;;;;;;;;OAUG;IACH,WAAW,CAAC,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC;CACpE;AAED,8EAA8E;AAC9E,MAAM,WAAW,QAAQ;IACrB,4DAA4D;IAC5D,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,4EAA4E;AAC5E,MAAM,WAAW,eAAe;IAC5B,0DAA0D;IAC1D,SAAS,EAAE,cAAc,EAAE,CAAC;CAC/B"}
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
*
|
|
32
32
|
* Every shape here is JSON-safe.
|
|
33
33
|
*/
|
|
34
|
+
import type { SourceDocument } from './enrichment.js';
|
|
34
35
|
/**
|
|
35
36
|
* One feed this plugin can serve.
|
|
36
37
|
*
|
|
@@ -167,5 +168,23 @@ export interface NewsProvider {
|
|
|
167
168
|
* one failing feed must not cost the others.
|
|
168
169
|
*/
|
|
169
170
|
fetchItems(query: NewsQuery): Promise<NewsItem[]>;
|
|
171
|
+
/**
|
|
172
|
+
* One page an operator named, as a document: its prose and the title it
|
|
173
|
+
* gives itself. Optional.
|
|
174
|
+
*
|
|
175
|
+
* For a programme somebody asked the station to make about a page, which
|
|
176
|
+
* is a different thing from a story: nothing about it came from a feed, so
|
|
177
|
+
* the host cannot fetch it itself (`host.fetch` is a plugin's, behind the
|
|
178
|
+
* plugin's own network grant) and has only the address to go on. A plugin
|
|
179
|
+
* that can already open whatever page a feed links to has everything it
|
|
180
|
+
* needs to open this one, so it is a method here rather than a capability
|
|
181
|
+
* of its own: `readDocument` in `article.parse.ts` is the whole of a
|
|
182
|
+
* typical implementation.
|
|
183
|
+
*
|
|
184
|
+
* `undefined` for a page with no prose on it, which is an ordinary answer.
|
|
185
|
+
* Throw for a page that could not be read, so the host can say which site
|
|
186
|
+
* it was.
|
|
187
|
+
*/
|
|
188
|
+
readPage?(url: string): Promise<SourceDocument | undefined>;
|
|
170
189
|
}
|
|
171
190
|
//# sourceMappingURL=news.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"news.d.ts","sourceRoot":"","sources":["../../src/capabilities/news.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAC;IACb,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,uCAAuC;AACvC,MAAM,WAAW,SAAS;IACtB;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sFAAsF;IACtF,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;;;;;;;OAeG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,2BAA2B;AAC3B,MAAM,WAAW,QAAQ;IACrB,kFAAkF;IAClF,EAAE,EAAE,MAAM,CAAC;IACX,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAC;IACf,6FAA6F;IAC7F,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,sFAAsF;IACtF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uFAAuF;IACvF,UAAU,CAAC,E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AO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,sFAAsF;IACtF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uFAAuF;IACvF,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB;;;;;;;;;;OAUG;IACH,SAAS,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAE3C;;;;;;;;OAQG;IACH,UAAU,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAElD;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC,CAAC;CAC/D"}
|
package/dist/index.js
CHANGED
|
@@ -39,6 +39,8 @@ var JSON_SAFE_PAYLOAD_TYPES = [
|
|
|
39
39
|
"TrackEnrichment",
|
|
40
40
|
"ArtistEnrichment",
|
|
41
41
|
"AlbumEnrichment",
|
|
42
|
+
"TopicRef",
|
|
43
|
+
"TopicEnrichment",
|
|
42
44
|
"SpeechRequest",
|
|
43
45
|
"SpeechVoice",
|
|
44
46
|
"LlmMessage",
|
|
@@ -632,6 +634,46 @@ function withoutApparatus(text2) {
|
|
|
632
634
|
}
|
|
633
635
|
__name(withoutApparatus, "withoutApparatus");
|
|
634
636
|
async function fetchArticle(host, url, init, options) {
|
|
637
|
+
const html = await fetchHtml(host, url, init);
|
|
638
|
+
return html === void 0 ? void 0 : extractArticle(html, options?.maxChars);
|
|
639
|
+
}
|
|
640
|
+
__name(fetchArticle, "fetchArticle");
|
|
641
|
+
async function readDocument(host, url, init, options) {
|
|
642
|
+
const html = await fetchHtml(host, url, init);
|
|
643
|
+
if (html === void 0) return void 0;
|
|
644
|
+
const text2 = extractArticle(html, options?.maxChars ?? DOCUMENT_MAX_CHARS);
|
|
645
|
+
if (text2 === void 0) return void 0;
|
|
646
|
+
return {
|
|
647
|
+
url,
|
|
648
|
+
title: extractTitle(html) ?? url,
|
|
649
|
+
text: text2,
|
|
650
|
+
retrievedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
__name(readDocument, "readDocument");
|
|
654
|
+
var DOCUMENT_MAX_CHARS = 2e4;
|
|
655
|
+
var TITLE_MAX_CHARS = 300;
|
|
656
|
+
function extractTitle(html) {
|
|
657
|
+
const meta = /<meta\b[^>]*>/gi;
|
|
658
|
+
let og;
|
|
659
|
+
for (let tag = meta.exec(html); tag !== null && og === void 0; tag = meta.exec(html)) {
|
|
660
|
+
if (!/\bproperty\s*=\s*(?:"og:title"|'og:title')/i.test(tag[0])) continue;
|
|
661
|
+
const content = /\bcontent\s*=\s*(?:"([^"]*)"|'([^']*)')/i.exec(tag[0]);
|
|
662
|
+
og = content?.[1] ?? content?.[2];
|
|
663
|
+
}
|
|
664
|
+
const candidates = [
|
|
665
|
+
og,
|
|
666
|
+
/<title\b[^>]*>([\s\S]*?)<\/title>/i.exec(html)?.[1],
|
|
667
|
+
/<h1\b[^>]*>([\s\S]*?)<\/h1>/i.exec(html)?.[1]
|
|
668
|
+
];
|
|
669
|
+
for (const candidate of candidates) {
|
|
670
|
+
const title = candidate === void 0 ? void 0 : plainText(candidate, TITLE_MAX_CHARS);
|
|
671
|
+
if (title !== void 0) return title;
|
|
672
|
+
}
|
|
673
|
+
return void 0;
|
|
674
|
+
}
|
|
675
|
+
__name(extractTitle, "extractTitle");
|
|
676
|
+
async function fetchHtml(host, url, init) {
|
|
635
677
|
const response = await host.fetch(url, init);
|
|
636
678
|
if (!response.ok) {
|
|
637
679
|
await response.body?.cancel();
|
|
@@ -646,9 +688,9 @@ async function fetchArticle(host, url, init, options) {
|
|
|
646
688
|
await response.body?.cancel();
|
|
647
689
|
return void 0;
|
|
648
690
|
}
|
|
649
|
-
return
|
|
691
|
+
return await response.text();
|
|
650
692
|
}
|
|
651
|
-
__name(
|
|
693
|
+
__name(fetchHtml, "fetchHtml");
|
|
652
694
|
|
|
653
695
|
// src/define.plugin.ts
|
|
654
696
|
function definePlugin(manifest, factory) {
|
|
@@ -1388,6 +1430,7 @@ export {
|
|
|
1388
1430
|
ARTICLE_MAX_CHARS,
|
|
1389
1431
|
BOUNDARY_LIVE_OBJECT_TYPES,
|
|
1390
1432
|
BOUNDARY_METHOD_TYPES,
|
|
1433
|
+
DOCUMENT_MAX_CHARS,
|
|
1391
1434
|
ENRICHMENT_MATCH_KEY_ARTIST_TITLE,
|
|
1392
1435
|
ENRICHMENT_MATCH_KEY_ISRC,
|
|
1393
1436
|
FEED_SUMMARY_MAX_CHARS,
|
|
@@ -1442,6 +1485,7 @@ export {
|
|
|
1442
1485
|
definePlugin,
|
|
1443
1486
|
errorText,
|
|
1444
1487
|
extractArticle,
|
|
1488
|
+
extractTitle,
|
|
1445
1489
|
fetchArticle,
|
|
1446
1490
|
fetchFeed,
|
|
1447
1491
|
firstSentence,
|
|
@@ -1464,6 +1508,7 @@ export {
|
|
|
1464
1508
|
pluginCodeForStatus,
|
|
1465
1509
|
pluginManifestSchema,
|
|
1466
1510
|
pluginPermissionsSchema,
|
|
1511
|
+
readDocument,
|
|
1467
1512
|
readRowSecret,
|
|
1468
1513
|
retryAfterMs,
|
|
1469
1514
|
rowSecretKey,
|